From 890db95567fa78899f2586ca8d8295f725d574cb Mon Sep 17 00:00:00 2001 From: qer Date: Fri, 12 Jun 2026 12:40:46 +0800 Subject: [PATCH] feat(web): render slash-command skill activations as a labeled chip A user turn whose origin metadata marks it as a skill_activation (trigger user-slash) no longer dumps the raw XML block into the chat: the turn shows only the user-provided args plus an "activated skill" label with the skill name. --- apps/kimi-web/src/components/ChatPane.vue | 47 ++++++++++++++++++- .../src/composables/messagesToTurns.ts | 20 +++++++- .../src/i18n/locales/en/conversation.ts | 1 + .../src/i18n/locales/zh/conversation.ts | 1 + apps/kimi-web/src/types.ts | 3 ++ apps/kimi-web/test/user-origin.test.ts | 24 ++++++++-- 6 files changed, 90 insertions(+), 6 deletions(-) diff --git a/apps/kimi-web/src/components/ChatPane.vue b/apps/kimi-web/src/components/ChatPane.vue index 5f5f71d79..95d37f2b1 100644 --- a/apps/kimi-web/src/components/ChatPane.vue +++ b/apps/kimi-web/src/components/ChatPane.vue @@ -278,8 +278,16 @@ function turnBlocks(turn: ChatTurn): TurnBlock[] { loading="lazy" /> + +
+
+ + {{ t('conversation.activatedSkill', { name: turn.skillActivation.name }) }} +
+
{{ turn.skillActivation.args }}
+
-
{{ turn.text }}
+
{{ turn.text }}
-
{{ turn.text }}
+
+
+
+ + {{ t('conversation.activatedSkill', { name: turn.skillActivation.name }) }} +
+
{{ turn.skillActivation.args }}
+
+ +