feat: v1.1.0 — 上下文引擎重构 + 技能系统升级 + SOUL.md 支持

- 版本号更新: 1.0.0 → 1.1.0,全量同步 package.json/lock/README/docs/UI
- 上下文长度自动检测: 切换模型时从 model_info 读取实际 context_length
- SOUL.md 支持: 每次发送自动扫描工作空间 SOUL.md,注入为首条 system 消息且不可压缩
- 系统提示词卡片: AI 回复顶部可折叠展示实际发送给模型的完整 system prompt
- Token 校准: 利用 Ollama 返回的实际计数动态修正估算器(EMA)
- 消息重要性评分: 纯规则打分,trim/summarize 按重要性而非时间顺序
- 结构化压缩: LLM 压缩输出 JSON 格式(topics/decisions/pendingTasks/constraints)
- 技能系统 v1.1: 语义匹配(embedding) + 参数自优化 + 未使用衰减 + 技能链合并
- 修复: 100+ TypeScript strict 模式编译错误清零
This commit is contained in:
thzxx
2026-06-04 21:47:18 +08:00
parent b12837433b
commit db6cb8d2cc
27 changed files with 646 additions and 139 deletions
+69
View File
@@ -900,6 +900,75 @@ html, body {
box-shadow: none;
}
/* ── 系统提示词折叠卡片 ── */
.system-prompt-card {
margin-bottom: 10px;
border: 1px solid rgba(155, 126, 216, 0.12);
border-radius: var(--radius-md);
overflow: hidden;
background: rgba(155, 126, 216, 0.03);
}
.system-prompt-header {
display: flex;
align-items: center;
gap: 6px;
padding: 6px 12px;
cursor: pointer;
user-select: none;
font-size: 12px;
color: var(--text-tertiary);
transition: background 0.15s;
}
.system-prompt-header:hover {
background: rgba(155, 126, 216, 0.06);
}
.sp-icon { font-size: 14px; flex-shrink: 0; }
.sp-title { font-weight: 600; color: #9B7ED8; white-space: nowrap; }
.sp-tokens {
font-size: 10px;
color: var(--text-tertiary);
background: var(--bg-layer);
padding: 1px 6px;
border-radius: 10px;
white-space: nowrap;
}
.sp-preview {
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 11px;
color: var(--text-tertiary);
}
.sp-chevron {
flex-shrink: 0;
transition: transform 0.2s;
color: var(--text-tertiary);
}
.sp-chevron.sp-expanded { transform: rotate(180deg); }
.system-prompt-body {
border-top: 1px solid rgba(155, 126, 216, 0.08);
max-height: 300px;
overflow-y: auto;
}
.system-prompt-body pre {
margin: 0;
padding: 10px 14px;
font-size: 11px;
line-height: 1.5;
color: var(--text-secondary);
white-space: pre-wrap;
word-break: break-word;
background: none;
border: none;
box-shadow: none;
font-family: var(--font);
}
/* 打字光标 */
.typing-cursor {
display: inline-block;