Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Tighten Assistant tool output badges

rcourtman7675397b8f3c
diff --git a/docs/release-control/v6/internal/subsystems/ai-runtime.md b/docs/release-control/v6/internal/subsystems/ai-runtime.md
index 9ce22736a9..630d0420f4 100644
--- a/docs/release-control/v6/internal/subsystems/ai-runtime.md
+++ b/docs/release-control/v6/internal/subsystems/ai-runtime.md
@@ -1012,6 +1012,13 @@ runtime cost control, and shared AI transport surfaces.
`frontend-modern/src/components/AI/Chat/ToolExecutionBlock.tsx`; completed
`tool_end` events preserve streamed `raw_input` for the same readable command
summary used while the tool is pending.
+ The 2026-06-07 completed-output badge slice rechecked OpenCode `origin/dev`
+ commit `e82542b8023a8374f29c23b70ec019c8f256354e` in the same
+ `session-v2.tsx` `GenericTool` / `Bash` renderers (lines 527-559 and
+ 702-735): overflow is communicated through the expandable tool block, not
+ through transport-sized copy in the compact row. Pulse adapts that by keeping
+ exact output type/size in the accessible label and Details panel while the
+ visible compact badge says only `output available`.
The referenced OpenCode source at fetched `origin/dev` commit
`fa2b63f850fc0a23bec2bdff9e660450d3fe7913` also keeps assistant text,
reasoning, and tool invocation as typed message parts in
diff --git a/frontend-modern/src/components/AI/Chat/ToolExecutionBlock.tsx b/frontend-modern/src/components/AI/Chat/ToolExecutionBlock.tsx
index c4389dfd4d..a48ff4b85f 100644
--- a/frontend-modern/src/components/AI/Chat/ToolExecutionBlock.tsx
+++ b/frontend-modern/src/components/AI/Chat/ToolExecutionBlock.tsx
@@ -302,6 +302,7 @@ export const ToolExecutionBlock: Component<ToolExecutionBlockProps> = (props) =>
const hiddenOutputSummary = createMemo(() =>
outputPreview() ? '' : formatHiddenOutputSummary(outputText()),
);
+ const hiddenOutputBadgeLabel = createMemo(() => (hiddenOutputSummary() ? 'output available' : ''));
const hasInput = createMemo(() => detailInputText().trim().length > 0);
const hasOutput = createMemo(() => hasReadableToolOutput(outputText()));
const hasDetails = createMemo(() => hasInput() || hasOutput());
@@ -434,7 +435,7 @@ export const ToolExecutionBlock: Component<ToolExecutionBlockProps> = (props) =>
title="Open tool details to inspect output"
aria-label={`Tool output available: ${hiddenOutputSummary()}`}
>
- {hiddenOutputSummary()}
+ {hiddenOutputBadgeLabel()}
</span>
</Show>
</div>
diff --git a/frontend-modern/src/components/AI/Chat/__tests__/ToolExecutionBlock.test.tsx b/frontend-modern/src/components/AI/Chat/__tests__/ToolExecutionBlock.test.tsx
index d70af82143..63ef0e1f8a 100644
--- a/frontend-modern/src/components/AI/Chat/__tests__/ToolExecutionBlock.test.tsx
+++ b/frontend-modern/src/components/AI/Chat/__tests__/ToolExecutionBlock.test.tsx
@@ -391,7 +391,7 @@ describe('ToolExecutionBlock', () => {
expect(screen.queryByText(/total_nodes/)).not.toBeInTheDocument();
expect(screen.getByLabelText('Tool output available: structured output')).toHaveTextContent(
- 'structured output',
+ 'output available',
);
expect(getToolDetailsTrigger()).toBeInTheDocument();
});
@@ -410,18 +410,20 @@ describe('ToolExecutionBlock', () => {
expect(text).not.toContain('line 1');
expect(text).not.toContain('line 5');
expect(screen.getByLabelText('Tool output available: 5 lines output')).toHaveTextContent(
- '5 lines output',
+ 'output available',
);
+ expect(screen.queryByText('5 lines output')).not.toBeInTheDocument();
expect(getToolDetailsTrigger()).toBeInTheDocument();
});
- it('summarizes suppressed single-line output by character count', () => {
+ it('keeps suppressed single-line output counts out of the visible row', () => {
render(() => <ToolExecutionBlock tool={makeTool({ output: 'x'.repeat(160) })} />);
expect(screen.queryByLabelText('Tool output preview')).not.toBeInTheDocument();
expect(screen.getByLabelText('Tool output available: 160 chars output')).toHaveTextContent(
- '160 chars output',
+ 'output available',
);
+ expect(screen.queryByText('160 chars output')).not.toBeInTheDocument();
});
it('previews failed plain-text output while keeping full details available', () => {