feat: 优化消息处理和界面显示

- 增强 messageHandler 消息处理逻辑
   - 优化 messageArea 显示效果
   - 改进 webviewContent 界面交互
This commit is contained in:
Roe-xin
2026-03-10 18:39:50 +08:00
parent c244a308d7
commit 29e80ce296
3 changed files with 32 additions and 8 deletions

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>\`;