fix(vscode-ide-companion): improve type safety in webview components

修复 webview 组件的类型安全问题:
- App.tsx: 规范化工具调用状态为联合类型
- InProgressToolCall.tsx: 安全处理非字符串类型的 title 属性
- InputForm.tsx: 修正 RefObject 泛型类型声明
- ReadToolCall.tsx: 添加空 children 避免 ToolCallContainer 警告
This commit is contained in:
yiliang114
2025-11-24 20:33:27 +08:00
parent b6914c6b33
commit 795e7fa2c5
4 changed files with 26 additions and 6 deletions

View File

@@ -10,7 +10,9 @@ type EditMode = 'ask' | 'auto' | 'plan';
interface InputFormProps {
inputText: string;
inputFieldRef: React.RefObject<HTMLDivElement | null>;
// Note: RefObject<T> carries nullability in its `current` property, so the
// generic should be `HTMLDivElement` (not `HTMLDivElement | null`).
inputFieldRef: React.RefObject<HTMLDivElement>;
isStreaming: boolean;
isComposing: boolean;
editMode: EditMode;