feat:实现携带路径发送信息的优化

- 将路径通过doc包裹起来便于后端读取
This commit is contained in:
Roe-xin
2026-03-20 11:45:01 +08:00
parent 4ba096d898
commit 1207d2b91a
8 changed files with 89 additions and 31 deletions

View File

@ -409,7 +409,7 @@ export function getDocsetDialogScript(): string {
listEl.innerHTML = docsetFiles.map((file, index) => \`
<div style="display: flex; justify-content: space-between; align-items: center; font-size: 12px; padding: 4px 0; color: var(--vscode-foreground);">
<span>\${file.relativePath || file.path}</span>
<span>\${file.name || file.absolutePath}</span>
<button onclick="removeDocsetFile(\${index})" style="background: transparent; border: none; color: var(--vscode-foreground); cursor: pointer; padding: 0 4px; opacity: 0.7;">
<svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor">
<path d="M10 3h3v1h-1v9l-1 1H4l-1-1V4H2V3h3V2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v1zM9 2H6v1h3V2zM4 13h7V4H4v9zm2-8H5v7h1V5zm1 0h1v7H7V5zm2 0h1v7H9V5z"/>
@ -538,7 +538,7 @@ export function getDocsetDialogScript(): string {
for (const file of message.files) {
if (file.size > MAX_FILE_SIZE) {
errors.push(\`\${file.path} 超过单个文件大小限制(\${formatFileSize(MAX_FILE_SIZE)}\`);
errors.push(\`\${file.name || file.absolutePath} 超过单个文件大小限制(\${formatFileSize(MAX_FILE_SIZE)}\`);
} else {
vaildFiles.push(file);
}