Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1504,7 +1504,9 @@ export default function App() {
return;
}

setTurnsFor(sid, optimisticTurns);
setTurnsFor(sid, (current) =>
createsSession ? optimisticTurns : [...current, ...optimisticTurns],
);
if (createsSession) {
viewSidRef.current = sid;
setSessionId(sid);
Expand Down
10 changes: 9 additions & 1 deletion frontend/tests/composerPresentation.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,20 @@ test("first message renders before session creation finishes", () => {
assert.match(appSource, /sid = await ensureSession\(!createsSession\)/);
assert.match(
appSource,
/setTurnsFor\(sid, optimisticTurns\);[\s\S]*?setSessionId\(sid\);[\s\S]*?setInitializingSession\(false\);/,
/setTurnsFor\(sid,\s*\(current\)\s*=>\s*createsSession\s*\?\s*optimisticTurns\s*:\s*\[\.\.\.current,\s*\.\.\.optimisticTurns\],\s*\);[\s\S]*?setSessionId\(sid\);[\s\S]*?setInitializingSession\(false\);/,
);
assert.match(appSource, /const conversationBusy = busy \|\| initializingSession/);
assert.match(composerSource, /sessionInitializing \? "初始化中" : sessionId \|\| "—"/);
});

test("subsequent messages append to the active session transcript", () => {
assert.match(
appSource,
/createsSession\s*\?\s*optimisticTurns\s*:\s*\[\.\.\.current,\s*\.\.\.optimisticTurns\]/,
);
assert.doesNotMatch(appSource, /setTurnsFor\(sid, optimisticTurns\);/);
});

test("new-session failure restores the submitted text", () => {
assert.match(
appSource,
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

695 changes: 0 additions & 695 deletions veadk/webui/assets/index-NDcH-KLD.js

This file was deleted.

695 changes: 695 additions & 0 deletions veadk/webui/assets/index-u-pg5XfV.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion veadk/webui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/svg+xml" href="/assets/volcengine-DM14a-L-.svg" />
<title>VeADK Studio</title>
<script type="module" crossorigin src="/assets/index-NDcH-KLD.js"></script>
<script type="module" crossorigin src="/assets/index-u-pg5XfV.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-60iUSTQP.css">
</head>
<body>
Expand Down
Loading