Merge branch 'feat/codeToChat' into feat/ningDeShiDai

This commit is contained in:
Roe-xin
2026-03-10 18:40:13 +08:00
4 changed files with 33 additions and 9 deletions

View File

@ -281,10 +281,18 @@ async function handleUserMessageWithBackend(
},
onSegmentUpdate: (segments) => {
// 过滤掉包含 [调用工具:xxx] 的段落
const filteredSegments = segments.filter(seg => {
if (seg.type === 'text' && typeof seg.content === 'string') {
return !/\[调用工具:.+?\]/.test(seg.content);
}
return true;
});
// 实时发送段落更新,按后端返回顺序展示
panel.webview.postMessage({
command: "updateSegments",
segments: segments,
segments: filteredSegments,
});
},

View File

@ -382,7 +382,7 @@ export function getMessageAreaStyles(): string {
}
/* 低调显示的工具调用 - 移除边距和背景 */
.segment-tool.low-profile {
margin: 5px 0px;
margin: 25px 0px;
padding: 0;
background: none;
}
@ -549,7 +549,7 @@ export function getMessageAreaStyles(): string {
max-height: 0;
}
.tool-segment-description {
margin: 6px 0 0 0px;
margin: 25px 0 0 0px;
font-size: 0.9rem;
color: var(--vscode-descriptionForeground);
line-height: 1.4;
@ -590,9 +590,9 @@ export function getMessageAreaStyles(): string {
}
.segment-question .question-option {
padding: 8px 16px;
background: #007ACC;
background: #3d3f41;
color: #ffffff;
border: 1px solid #007ACC;
border: 1px solid #474747;
border-radius: 6px;
cursor: pointer;
transition: all 0.2s;
@ -1211,7 +1211,7 @@ export function getMessageAreaScript(): string {
const optionsHtml = q.options.map(opt => {
const isSelected = selectedAnswers.includes(opt);
return \`<label class="question-option\${isSelected ? ' selected' : ''}" style="display:flex;align-items:center;gap:6px;cursor:pointer;padding:4px 0;">
return \`<label class="question-option\${isSelected ? ' selected' : ''}" style="display:flex;align-items:center;gap:6px;cursor:pointer;padding:5px 5px 5px 0;">
<input type="\${inputType}" name="\${inputName}" value="\${opt}" \${isSelected ? 'checked' : ''} \${isAnswered ? 'disabled' : ''}>
<span>\${opt}</span>
</label>\`;

View File

@ -25,7 +25,7 @@ export function getProgressBarContent(): string {
<span class="step-number">1</span>
<span class="step-check">✓</span>
</div>
<div class="step-label">Spec</div>
<div class="step-label">Specification</div>
</div>
<div class="progress-line"></div>

View File

@ -381,16 +381,32 @@ export function getWebviewContent(
font-size: 13px;
color: var(--vscode-descriptionForeground);
}
.status-bar #statusText {
background: linear-gradient(90deg,
var(--vscode-descriptionForeground) 0%,
var(--vscode-foreground) 50%,
var(--vscode-descriptionForeground) 100%);
background-size: 200% 100%;
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
animation: textShimmer 2s linear infinite;
}
@keyframes textShimmer {
0% { background-position: 200% 0; }
100% { background-position: -200% 0; }
}
.status-indicator {
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--vscode-charts-blue);
animation: statusPulse 1.5s ease-in-out infinite;
box-shadow: 0 0 8px currentColor;
}
@keyframes statusPulse {
0%, 100% { opacity: 1; transform: scale(1); }
50% { opacity: 0.5; transform: scale(0.8); }
0%, 100% { opacity: 1; transform: scale(1.2); }
50% { opacity: 0.3; transform: scale(0.6); }
}
.status-bar.working .status-indicator {
background: var(--vscode-charts-orange);