@arbidocs/tui 0.3.134 → 0.3.136

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.js CHANGED
@@ -1970,7 +1970,7 @@ async function streamResponse(tui, response, docNames) {
1970
1970
  tui.chatLog.updateAssistant(accumulated);
1971
1971
  tui.requestRender();
1972
1972
  };
1973
- let lastStepIndex = null;
1973
+ let lastItemId = null;
1974
1974
  let lastStepLabel = "";
1975
1975
  const callbacks = {
1976
1976
  onStreamStart: (data) => {
@@ -1982,11 +1982,13 @@ async function streamResponse(tui, response, docNames) {
1982
1982
  updateAnswer(accumulated + content);
1983
1983
  },
1984
1984
  onTextDone: updateAnswer,
1985
- onAgentStep: (data) => {
1986
- const label = sdk.formatAgentStepLabel(data, docNames);
1985
+ onOutputItemDone: (ev) => {
1986
+ const item = ev.item;
1987
+ if (item.type !== "function_call" && item.type !== "reasoning") return;
1988
+ const label = sdk.formatItemLabel(item, docNames);
1987
1989
  if (label) {
1988
- if (data.index === lastStepIndex && label === lastStepLabel) return;
1989
- lastStepIndex = data.index;
1990
+ if (item.id === lastItemId && label === lastStepLabel) return;
1991
+ lastItemId = item.id ?? null;
1990
1992
  lastStepLabel = label;
1991
1993
  tui.chatLog.addAgentStep(label);
1992
1994
  tui.requestRender();