@wrongstack/webui 0.5.5 → 0.5.6

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-DmGneeHU.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-3Lo5wUfj.js"></script>
9
9
  <link rel="modulepreload" crossorigin href="/assets/vendor-Dff2jyfM.js">
10
10
  <link rel="stylesheet" crossorigin href="/assets/index-B-u6omip.css">
11
11
  </head>
package/dist/index.js CHANGED
@@ -1004,6 +1004,10 @@ function installHandlers(ws) {
1004
1004
  if (b.type === "text" && typeof b.text === "string") {
1005
1005
  text += (text ? "\n" : "") + b.text;
1006
1006
  } else if (b.type === "tool_use") {
1007
+ if (text) {
1008
+ chat.addMessage({ role: m.role, content: text });
1009
+ text = "";
1010
+ }
1007
1011
  chat.addMessage({
1008
1012
  role: "tool",
1009
1013
  content: "",
@@ -1011,7 +1015,6 @@ function installHandlers(ws) {
1011
1015
  toolInput: b.input,
1012
1016
  toolUseId: String(b.id ?? "")
1013
1017
  });
1014
- text = "";
1015
1018
  } else if (b.type === "tool_result") {
1016
1019
  const all = useChatStore.getState().messages;
1017
1020
  let last;