fix: 发送消息后清空上下文文件列表
修复了发送消息后上下文文件仍然显示在输入框中的问题。 - 在 sendMessage() 函数中添加 clearContextItems() 调用 - 调整脚本加载顺序,确保 contextDisplay 在 contextButton 之前初始化
This commit is contained in:
@ -296,8 +296,8 @@ export function getInputAreaScript(): string {
|
||||
return `
|
||||
// 注意:getModeSelectorScript() 已在 webviewContent.ts 开头加载,这里不再重复加载
|
||||
${getModelSelectorScript()}
|
||||
${getContextButtonScript()}
|
||||
${getContextDisplayScript()}
|
||||
${getContextButtonScript()}
|
||||
${getContextCompressScript()}
|
||||
${getOptimizeButtonScript()}
|
||||
|
||||
@ -438,6 +438,11 @@ export function getInputAreaScript(): string {
|
||||
autoResizeTextarea(); // 重置输入框高度
|
||||
messageInput.focus();
|
||||
|
||||
// 清空上下文项
|
||||
if (window.clearContextItems) {
|
||||
window.clearContextItems();
|
||||
}
|
||||
|
||||
// 重置优化状态
|
||||
resetOptimizeButton();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user