feat(web): 设置页按新分类重排,加搜索、缓存分区与旧锚点跳转
- 左栏三组分区 + 当前分区的节;窄屏为搜索框、分组下拉和节的横排胶囊 - 搜索框按分区、节、节别名和字段名定位,选中字段时滚到该字段并聚焦 - 旧 hash(#automation/cache、#api-keys、#library/scrape 等)replace 到新位置 - 下载器分区放下载盘水位与保种缺省值,名字与实例抽屉统一(暂停线 / 恢复线 / 保种天数) - 新增获取、整理与刮削、系统、缓存分区;API Key 并入账户与安全,快捷键移到界面 - 补上缺的入口:最小视频体积、子会话并发与层数、搜索站点;日志保留天数(已废弃)不再显示 - 缓存分区按区列出条数、占用、最近写入,单区清空二次确认;TMDB 与图片缓存并入 - 保存提示统一为「已保存「节名」」;按入库口径把相关文案改成「整理」 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Cxwgnn2pbzQ7rXv3rq7fei
This commit is contained in:
1 parent
93a6c8a910
commit
8071ad33f9
23 files changed
+1499
-642
No files matched your search
@@ -7,9 +7,10 @@ import type { FieldSpec } from "./resource-section.tsx";
|
||||
import { num, str } from "./resource-section.tsx";
|
||||
import { type CardSpec, n, SettingsCard, SettingsGate } from "./settings-card.tsx";
|
||||
|
||||
// Agent 分区:上游(pi_upstream)+ 上下文与子代理(pi)+ 用量与限制(单次防跑飞上限 + 花费统计)+ 自动调查 + 网页搜索 + 高级
|
||||
// 智能体分区:模型服务(pi_upstream)→ 用量与限制(不设预算,只有单次防跑飞上限 + 花费统计)→ 自动处理(识别失败自动派智能体、
|
||||
// 自动调查)→ 上下文与子会话 → 网页搜索 → MCP 服务端与能力清单(agent-tools.tsx)→ 高级
|
||||
|
||||
const RUNTIME_CARD: CardSpec = {
|
||||
export const RUNTIME_CARD: CardSpec = {
|
||||
anchor: "runtime",
|
||||
title: "上下文与子会话",
|
||||
fields: [
|
||||
@@ -20,7 +21,26 @@ const RUNTIME_CARD: CardSpec = {
|
||||
tokens: { min: 4000, max: 2_000_000, required: true },
|
||||
hint: "4K–2000K,超过模型窗口时按窗口算",
|
||||
},
|
||||
{ name: "pi.subagentsEnabled", label: "允许子会话", kind: "switch" },
|
||||
{
|
||||
name: "pi.subagentsEnabled",
|
||||
label: "允许子会话",
|
||||
kind: "switch",
|
||||
hint: "智能体可以把独立的小目标交给子会话并行做",
|
||||
},
|
||||
{
|
||||
name: "pi.subagents.maxConcurrent",
|
||||
label: "同时运行的子会话",
|
||||
kind: "number",
|
||||
hint: "一个会话最多同时跑几个子会话;1–8",
|
||||
visible: (v) => v["pi.subagentsEnabled"] === true,
|
||||
},
|
||||
{
|
||||
name: "pi.subagents.maxDepth",
|
||||
label: "派生层数",
|
||||
kind: "number",
|
||||
hint: "1 表示子会话不能再派生;1–3",
|
||||
visible: (v) => v["pi.subagentsEnabled"] === true,
|
||||
},
|
||||
{ name: "pi.compaction.enabled", label: "上下文压缩", kind: "switch" },
|
||||
{
|
||||
name: "pi.compaction.thresholdRatio",
|
||||
@@ -32,7 +52,9 @@ const RUNTIME_CARD: CardSpec = {
|
||||
],
|
||||
fromSettings: (s) => ({
|
||||
"pi.contextBudget": tokensToK(s.pi.contextBudget),
|
||||
"pi.subagentsEnabled": s.pi.subagentsEnabled,
|
||||
"pi.subagentsEnabled": s.pi.subagents?.enabled ?? s.pi.subagentsEnabled,
|
||||
"pi.subagents.maxConcurrent": n(s.pi.subagents?.maxConcurrent),
|
||||
"pi.subagents.maxDepth": n(s.pi.subagents?.maxDepth),
|
||||
"pi.compaction.enabled": s.pi.compaction.enabled,
|
||||
"pi.compaction.thresholdRatio": n(s.pi.compaction.thresholdRatio),
|
||||
}),
|
||||
@@ -40,6 +62,11 @@ const RUNTIME_CARD: CardSpec = {
|
||||
pi: {
|
||||
contextBudget: kToTokens(str(v["pi.contextBudget"])),
|
||||
subagentsEnabled: v["pi.subagentsEnabled"] === true,
|
||||
subagents: {
|
||||
enabled: v["pi.subagentsEnabled"] === true,
|
||||
maxConcurrent: num(v["pi.subagents.maxConcurrent"]),
|
||||
maxDepth: num(v["pi.subagents.maxDepth"]),
|
||||
},
|
||||
compaction: {
|
||||
enabled: v["pi.compaction.enabled"] === true,
|
||||
thresholdRatio: num(v["pi.compaction.thresholdRatio"]),
|
||||
@@ -50,7 +77,7 @@ const RUNTIME_CARD: CardSpec = {
|
||||
|
||||
// 2026-10-06:不设每日次数 / 每日花费 / 单次花费 / 单次 token 上限(旧值兼容读取、不生效),
|
||||
// 只保留单次工具调用次数与时长两个防跑飞限制;花费在这里与运行状态里可见
|
||||
const BUDGET_CARD: CardSpec = {
|
||||
export const BUDGET_CARD: CardSpec = {
|
||||
anchor: "budget",
|
||||
title: "用量与限制",
|
||||
description: "不限次数和花费。单次运行只限制工具调用次数和时长,防止跑飞。",
|
||||
@@ -75,10 +102,10 @@ const BUDGET_CARD: CardSpec = {
|
||||
),
|
||||
};
|
||||
|
||||
const INVESTIGATE_CARD: CardSpec = {
|
||||
export const INVESTIGATE_CARD: CardSpec = {
|
||||
anchor: "investigate",
|
||||
title: "自动调查",
|
||||
description: "下载完识别不到作品时叫智能体识别;下载失败、集数对不上等问题出现时,自动发起一次有界调查。",
|
||||
title: "自动处理",
|
||||
description: "整理时识别不到作品就叫智能体识别;下载失败、集数对不上等问题出现时,自动发起一次有界调查。",
|
||||
fields: [
|
||||
{
|
||||
name: "agent.autoIdentifyOrganize",
|
||||
@@ -144,13 +171,13 @@ const INVESTIGATE_CARD: CardSpec = {
|
||||
|
||||
const DEV_ONLY_FIELDS = new Set(["agent.sessionDir", "agent.fakeScript"]);
|
||||
|
||||
const ADVANCED_CARD: CardSpec = {
|
||||
export const ADVANCED_CARD: CardSpec = {
|
||||
anchor: "advanced",
|
||||
title: "高级",
|
||||
// 会话目录与 fake 脚本是开发调试项,生产构建不显示(DEAI-2)
|
||||
fields: (
|
||||
[
|
||||
{ name: "agent.goalPollSec", label: "目标轮询间隔(秒)", kind: "number", hint: "等下载、入库结束时的检查间隔" },
|
||||
{ name: "agent.goalPollSec", label: "目标轮询间隔(秒)", kind: "number", hint: "等下载、整理结束时的检查间隔" },
|
||||
{
|
||||
name: "agent.goalWaitHours",
|
||||
label: "目标最长等待(小时)",
|
||||
@@ -223,15 +250,15 @@ export function AgentSection() {
|
||||
<SettingsGate>
|
||||
{(s) => (
|
||||
<>
|
||||
<SettingsCard section="agent" spec={RUNTIME_CARD} settings={s} />
|
||||
<SettingsCard section="agent" spec={BUDGET_CARD} settings={s} />
|
||||
<SettingsCard section="agent" spec={INVESTIGATE_CARD} settings={s} />
|
||||
<SettingsCard section="agent" spec={RUNTIME_CARD} settings={s} />
|
||||
<SettingsCard section="agent" spec={WEBSEARCH_CARD} settings={s} />
|
||||
<SettingsCard section="agent" spec={ADVANCED_CARD} settings={s} />
|
||||
</>
|
||||
)}
|
||||
</SettingsGate>
|
||||
<AgentToolsBlock />
|
||||
<SettingsGate>{(s) => <SettingsCard section="agent" spec={ADVANCED_CARD} settings={s} />}</SettingsGate>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user