fix(agents): preserve copy fallback and guard new session submission

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
leefer
2026-10-14 22:15:48 +08:00
co-authored by multica-agent
parent d4e199f3c8
commit 780ac52ffc
3 changed files with 79 additions and 2 deletions
+4 -1
View File
@@ -187,6 +187,7 @@
async function newSession() {
if (sendPending || uploadPending || projectPending) return;
sendPending = true;
try {
const s = await agentApi.createSession({
agent_key: activeKey,
@@ -201,6 +202,8 @@
resetStreaming();
} catch (err) {
toast.error(err instanceof Error ? err.message : String(err));
} finally {
sendPending = false;
}
}
@@ -1782,7 +1785,7 @@
id="agent-result-editor"
aria-label="编辑智能体创作内容"
bind:value={resultText}
disabled={resultBusy}
readonly={resultBusy}
></textarea>
<p class="empty-skills">
{resultKey === 'script'