From c8478e65af18d025e2a8b05593fd7ca4300d15c4 Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Mon, 8 Jun 2026 12:55:04 +0200 Subject: [PATCH 1/2] feat(assistant): refine tool display and streaming behavior Add a generic tool labeler (`getToolText`/`getToolSuffix`/`getToolIcon`) so any MCP server's tools render with clean labels, suffixes and icons instead of falling back to raw tool names. Split the stable verb from the dynamic detail and render it as a suffix. Make tool output fully scrollable instead of truncating it, and parse the standard MCP `{ content: [{ text }] }` envelope generically. On the backend, replace the custom stop condition with `stepCountIs`, force a final text answer on the last step via `prepareStep`, bump `maxOutputTokens` to 8000, enable gateway caching and `smoothStream`. --- docs/app/components/content/AssistantDemo.vue | 17 +--- layer/app/utils/assistantTools.ts | 87 +++++++++++++++++++ .../runtime/components/AssistantIndicator.vue | 4 +- .../runtime/components/AssistantPanel.vue | 53 +++-------- .../assistant/runtime/server/api/search.ts | 30 +++---- 5 files changed, 118 insertions(+), 73 deletions(-) create mode 100644 layer/app/utils/assistantTools.ts diff --git a/docs/app/components/content/AssistantDemo.vue b/docs/app/components/content/AssistantDemo.vue index 563411a22..d37d39e67 100644 --- a/docs/app/components/content/AssistantDemo.vue +++ b/docs/app/components/content/AssistantDemo.vue @@ -1,6 +1,6 @@ diff --git a/layer/modules/assistant/runtime/components/AssistantPanel.vue b/layer/modules/assistant/runtime/components/AssistantPanel.vue index 9e6109e9d..e3a485b9b 100644 --- a/layer/modules/assistant/runtime/components/AssistantPanel.vue +++ b/layer/modules/assistant/runtime/components/AssistantPanel.vue @@ -1,9 +1,10 @@