chore: rebuild release package
This commit is contained in:
@@ -6528,24 +6528,24 @@
|
||||
return null;
|
||||
}
|
||||
|
||||
function createPlanProgressElement(tool) {
|
||||
const progress = resolveToolPlanProgress(tool);
|
||||
if (!progress) return null;
|
||||
function createPlanProgressElementFromProgress(progress, options = {}) {
|
||||
const normalizedProgress = normalizePlanProgress(progress);
|
||||
if (!normalizedProgress) return null;
|
||||
|
||||
const meter = document.createElement('span');
|
||||
meter.className = 'plan-progress';
|
||||
meter.setAttribute('role', 'img');
|
||||
const progressLabel = `计划进度:已完成 ${progress.completed} 项,共 ${progress.total} 项`;
|
||||
const progressLabel = `计划进度:已完成 ${normalizedProgress.completed} 项,共 ${normalizedProgress.total} 项`;
|
||||
meter.setAttribute('aria-label', progressLabel);
|
||||
meter.title = progressLabel;
|
||||
|
||||
const dots = document.createElement('span');
|
||||
dots.className = 'plan-progress-dots';
|
||||
dots.setAttribute('aria-hidden', 'true');
|
||||
const visibleDotCount = Math.min(progress.total, 12);
|
||||
const completedDotCount = progress.total <= visibleDotCount
|
||||
? progress.completed
|
||||
: Math.round((progress.completed / progress.total) * visibleDotCount);
|
||||
const visibleDotCount = Math.min(normalizedProgress.total, 12);
|
||||
const completedDotCount = normalizedProgress.total <= visibleDotCount
|
||||
? normalizedProgress.completed
|
||||
: Math.round((normalizedProgress.completed / normalizedProgress.total) * visibleDotCount);
|
||||
for (let index = 0; index < visibleDotCount; index += 1) {
|
||||
const dot = document.createElement('span');
|
||||
dot.className = `plan-progress-dot ${index < completedDotCount ? 'is-complete' : 'is-remaining'}`;
|
||||
@@ -6553,16 +6553,20 @@
|
||||
}
|
||||
meter.appendChild(dots);
|
||||
|
||||
if (progress.total > visibleDotCount) {
|
||||
if (options.alwaysShowCount || normalizedProgress.total > visibleDotCount) {
|
||||
const count = document.createElement('span');
|
||||
count.className = 'plan-progress-count';
|
||||
count.setAttribute('aria-hidden', 'true');
|
||||
count.textContent = `${progress.completed}/${progress.total}`;
|
||||
count.textContent = `${normalizedProgress.completed}/${normalizedProgress.total}`;
|
||||
meter.appendChild(count);
|
||||
}
|
||||
return meter;
|
||||
}
|
||||
|
||||
function createPlanProgressElement(tool) {
|
||||
return createPlanProgressElementFromProgress(resolveToolPlanProgress(tool));
|
||||
}
|
||||
|
||||
function toolSubtitle(tool) {
|
||||
if (toolKind(tool) === 'file_change') {
|
||||
return '';
|
||||
@@ -6863,6 +6867,7 @@
|
||||
if (/^(returned|return)$/.test(normalized)) return 'returned';
|
||||
if (/^(completed|complete|done|finished|finish|success|succeeded)$/.test(normalized)) return 'completed';
|
||||
if (/^(closed|close|closing|stopped|stop)$/.test(normalized)) return 'closed';
|
||||
if (normalized === 'interrupted') return 'interrupted';
|
||||
if (/^(failed|fail|error|errored|cancelled|canceled|aborted|rejected)$/.test(normalized)) return 'failed';
|
||||
return done ? 'completed' : 'running';
|
||||
}
|
||||
@@ -6971,8 +6976,12 @@
|
||||
nickname: cleanCollabAgentText(state.nickname || ''),
|
||||
name: cleanCollabAgentText(state.name || ''),
|
||||
role,
|
||||
agentPath: cleanCollabAgentText(state.agentPath || state.agent_path || ''),
|
||||
status,
|
||||
detail,
|
||||
planProgress: normalizePlanProgress(state.planProgress || state.plan_progress),
|
||||
planCurrentStep: cleanCollabAgentText(state.planCurrentStep || state.plan_current_step || ''),
|
||||
planUpdatedAt: state.planUpdatedAt || state.plan_updated_at || null,
|
||||
taskDescription,
|
||||
hasReadableSourceTitle,
|
||||
};
|
||||
@@ -7346,7 +7355,7 @@
|
||||
function collabStateTone(statusText) {
|
||||
const normalized = String(statusText || '').toLowerCase();
|
||||
if (!normalized) return 'pending';
|
||||
if (/(closed|close)/.test(normalized)) return 'closed';
|
||||
if (/(closed|close|interrupted)/.test(normalized)) return 'closed';
|
||||
if (/(returned|done|completed|success|finished|idle)/.test(normalized)) return 'done';
|
||||
if (/(fail|error|cancel|aborted|rejected)/.test(normalized)) return 'error';
|
||||
if (/(running|working|active|inprogress|in_progress|executing)/.test(normalized)) return 'running';
|
||||
@@ -7357,6 +7366,7 @@
|
||||
const normalized = String(statusText || '').trim();
|
||||
if (!normalized) return '等待中';
|
||||
const lower = normalized.toLowerCase();
|
||||
if (/interrupted/.test(lower)) return '已中断';
|
||||
if (/(closed|close)/.test(lower)) return '已关闭';
|
||||
if (/(returned)/.test(lower)) return '已返回';
|
||||
if (/(done|completed|success|finished)/.test(lower)) return '已返回';
|
||||
@@ -7431,6 +7441,7 @@
|
||||
displayTitle,
|
||||
descriptionTitle,
|
||||
entry.role ? `角色: ${entry.role}` : '',
|
||||
entry.agentPath ? `路径: ${entry.agentPath}` : '',
|
||||
entry.detail ? `结果: ${entry.detail}` : '',
|
||||
entry.id ? `ID: ${entry.id}` : '',
|
||||
].filter(Boolean).join('\n');
|
||||
@@ -7465,12 +7476,12 @@
|
||||
const closeBtn = document.createElement('button');
|
||||
closeBtn.type = 'button';
|
||||
closeBtn.className = 'collab-agent-close-btn';
|
||||
closeBtn.textContent = '关闭';
|
||||
closeBtn.title = `关闭子代理\n${entry.id}`;
|
||||
closeBtn.textContent = '中断';
|
||||
closeBtn.title = `中断当前子代理任务\n${entry.id}`;
|
||||
closeBtn.addEventListener('click', (event) => {
|
||||
event.stopPropagation();
|
||||
closeBtn.disabled = true;
|
||||
closeBtn.textContent = '关闭中';
|
||||
closeBtn.textContent = '中断中';
|
||||
send({
|
||||
type: 'ccweb_mcp_child_agent_close',
|
||||
sessionId: currentSessionId,
|
||||
@@ -7487,10 +7498,28 @@
|
||||
description.title = descriptionTitle;
|
||||
item.appendChild(description);
|
||||
|
||||
if (entry.id || entry.role) {
|
||||
const planProgress = normalizePlanProgress(entry.planProgress);
|
||||
if (planProgress) {
|
||||
const plan = document.createElement('div');
|
||||
plan.className = 'collab-agent-item-plan';
|
||||
const meter = createPlanProgressElementFromProgress(planProgress, { alwaysShowCount: true });
|
||||
if (meter) plan.appendChild(meter);
|
||||
item.appendChild(plan);
|
||||
|
||||
const currentStepText = cleanCollabAgentText(entry.planCurrentStep);
|
||||
if (currentStepText) {
|
||||
const currentStep = document.createElement('div');
|
||||
currentStep.className = 'collab-agent-item-plan-current';
|
||||
currentStep.textContent = `当前:${currentStepText}`;
|
||||
currentStep.title = currentStepText;
|
||||
item.appendChild(currentStep);
|
||||
}
|
||||
}
|
||||
|
||||
if (entry.id || entry.role || entry.agentPath) {
|
||||
const footer = document.createElement('div');
|
||||
footer.className = 'collab-agent-item-footer';
|
||||
footer.textContent = entry.role || '';
|
||||
footer.textContent = [entry.role, entry.agentPath].filter(Boolean).join(' · ');
|
||||
if (!footer.textContent) footer.hidden = true;
|
||||
item.appendChild(footer);
|
||||
}
|
||||
@@ -9019,11 +9048,12 @@
|
||||
showOptionPicker(`选择 ${isCodexAppAgent(currentAgent) ? 'Codex App' : 'Codex'} 模型`, baseOptions, current.base || '', (baseValue) => {
|
||||
const base = String(baseValue || '').trim();
|
||||
const thinkingOptions = [
|
||||
{ value: '', label: '无 (默认)', desc: '不附加 (low/medium/high/xhigh) 后缀' },
|
||||
{ value: '', label: '无 (默认)', desc: '不附加推理强度后缀' },
|
||||
{ value: 'low', label: 'low', desc: '较轻 thinking' },
|
||||
{ value: 'medium', label: 'medium', desc: '中等 thinking' },
|
||||
{ value: 'high', label: 'high', desc: '更强 thinking' },
|
||||
{ value: 'xhigh', label: 'xhigh', desc: '最强 thinking' },
|
||||
{ value: 'xhigh', label: 'xhigh', desc: '高强度 thinking' },
|
||||
{ value: 'ultra', label: 'ultra', desc: '最高强度 thinking' },
|
||||
];
|
||||
showOptionPicker('选择 Thinking 强度', thinkingOptions, current.level || '', (lvl) => {
|
||||
const level = String(lvl || '').trim().toLowerCase();
|
||||
|
||||
@@ -5899,6 +5899,38 @@ html[data-theme='coolvibe'] .settings-back:hover {
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
.collab-agent-item-plan {
|
||||
display: flex;
|
||||
min-width: 0;
|
||||
align-items: center;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
.collab-agent-item-plan .plan-progress {
|
||||
min-width: 0;
|
||||
}
|
||||
.collab-agent-item-plan .plan-progress-dots {
|
||||
gap: 4px;
|
||||
}
|
||||
.collab-agent-item-plan .plan-progress-dot {
|
||||
flex: 0 0 8px;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
margin-left: 0;
|
||||
background-size: contain;
|
||||
}
|
||||
.collab-agent-item-plan .plan-progress-count {
|
||||
font-size: 10px;
|
||||
font-weight: 700;
|
||||
}
|
||||
.collab-agent-item-plan-current {
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
color: var(--text-muted);
|
||||
font-size: 11px;
|
||||
line-height: 1.25;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.collab-agent-item-footer {
|
||||
font-size: 11px;
|
||||
color: var(--text-muted);
|
||||
|
||||
Reference in New Issue
Block a user