From 603c2af3509db9893f8592fa38b56016d3b052f8 Mon Sep 17 00:00:00 2001 From: yinjiajun <316390862@qq.com> Date: Thu, 11 Dec 2025 10:44:16 +0800 Subject: [PATCH] fix: add ExtendedToolState type for approval-related states - Create shared types.ts for ExtendedToolState definition - Fix TypeScript errors in ToolStatusBadge and Confirmation components - Add type safety for 'approval-requested', 'approval-responded', 'output-denied' states - Improve accessibility with aria-label and ARIA attributes - Replace 'any' types with proper SpeechRecognition types --- .../elements/src/confirmation/Confirmation.vue | 4 ++-- packages/elements/src/confirmation/context.ts | 4 ++-- .../src/conversation/ConversationScrollButton.vue | 1 + packages/elements/src/index.ts | 1 + packages/elements/src/loader/Loader.vue | 3 +++ .../src/prompt-input/PromptInputSpeechButton.vue | 4 ++-- packages/elements/src/tool/ToolStatusBadge.vue | 8 ++++---- packages/elements/src/tool/index.ts | 1 + packages/elements/src/types.ts | 15 +++++++++++++++ packages/examples/src/confirmation-accepted.vue | 3 ++- packages/examples/src/confirmation-rejected.vue | 3 ++- packages/examples/src/confirmation.vue | 3 ++- 12 files changed, 37 insertions(+), 13 deletions(-) create mode 100644 packages/elements/src/types.ts diff --git a/packages/elements/src/confirmation/Confirmation.vue b/packages/elements/src/confirmation/Confirmation.vue index 812ceeb..580c004 100644 --- a/packages/elements/src/confirmation/Confirmation.vue +++ b/packages/elements/src/confirmation/Confirmation.vue @@ -1,6 +1,6 @@