@wrongstack/webui 0.281.0 → 0.281.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.html CHANGED
@@ -5,7 +5,7 @@
5
5
  <link rel="icon" type="image/svg+xml" href="/wrongstack.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>WrongStack WebUI</title>
8
- <script type="module" crossorigin src="/assets/index-DJpDzI2b.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-BSuiEQIC.js"></script>
9
9
  <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-QTnfLwEv.js">
10
10
  <link rel="modulepreload" crossorigin href="/assets/markdown-D0X23O-i.js">
11
11
  <link rel="modulepreload" crossorigin href="/assets/vendor-Bhf0nZ3B.js">
package/dist/index.js CHANGED
@@ -21231,8 +21231,12 @@ function handleRunResult(msg) {
21231
21231
  useSessionStore.getState().setIteration(null);
21232
21232
  useChatStore.getState().setLoading(false);
21233
21233
  const streamingId = useChatStore.getState().currentAssistantMessageId;
21234
+ const finalText = payload.status === "done" ? payload.finalText?.trim() : void 0;
21234
21235
  if (streamingId) {
21235
- useChatStore.getState().updateMessage(streamingId, { streaming: false });
21236
+ const streamed = useChatStore.getState().messages.find((m) => m.id === streamingId);
21237
+ useChatStore.getState().updateMessage(streamingId, { content: streamed?.content?.trim() ? streamed.content : finalText ?? streamed?.content ?? "", streaming: false });
21238
+ } else if (finalText) {
21239
+ useChatStore.getState().addMessage({ role: "assistant", content: finalText });
21236
21240
  }
21237
21241
  useChatStore.getState().setCurrentAssistantMessage(null);
21238
21242
  useChatStore.getState().clearThinking();