merge: reconcile main(lsdefine 70792af) with old desktop/main graft history

This commit is contained in:
dd3xp committed 2026-06-24 11:22:43 +08:00
commit 7d815b93e7
3 files changed
+10 -15

No files matched your search

+3 -3
View File
@@ -60,10 +60,10 @@
}},
{"type": "function", "function": {
"name": "ask_user",
"description": "Interrupt task to ask user when needing decisions, extra info, or facing unresolvable blockers. Multiple questions should in one call",
"description": "Interrupt task to ask user when needing decisions, extra info, or facing unresolvable blockers. For multiple questions, use one call and put all in question—do not call repeatedly.",
"parameters": {"type": "object", "properties": {
"question": {"type": "string", "description": "For multiple questions, one per line (contain candidates)"},
"candidates": {"type": "array", "items": {"type": "string"}, "description": "Optional quick-select choices for a single question only. Leave empty for multi-questions"}}}
"question": {"type": "string", "description": "Question for the user. For multiple questions, one per line (e.g. \"1. …\" / \"2. …\" or \"Q1: …\"); put A/B/C options under each question in this field. Do not cram multiple questions on one line. candidates is for single-question quick picks only."},
"candidates": {"type": "array", "items": {"type": "string"}, "description": "Optional quick-select choices for a single question only. Leave empty for multi-question prompts; put per-question options in question instead."}}}
}},
{"type": "function", "function": {
"name": "start_long_term_update",
+3 -3
View File
@@ -60,10 +60,10 @@
}},
{"type": "function", "function": {
"name": "ask_user",
"description": "当需要用户决策、提供额外信息或遇到无法自动解决的阻碍时,调用此工具中断任务并提问。多题时应一次调用",
"description": "当需要用户决策、提供额外信息或遇到无法自动解决的阻碍时,调用此工具中断任务并提问。多题应一次调用、全部写在 question 里,不要多次调用。",
"parameters": {"type": "object", "properties": {
"question": {"type": "string", "description": "多题时每题*独占*一行(带选项)"},
"candidates": {"type": "array", "items": {"type": "string"}, "description": "仅单题时可用。多题时留空"}}}
"question": {"type": "string", "description": "向用户提出的明确问题。多题时每题独占一行(如「1. …」「2. …」或「问题1: …」),每题下的选项用 A. B. C. 写在 question 内;不要用一行挤多题。candidates 仅用于单题快捷选项。"},
"candidates": {"type": "array", "items": {"type": "string"}, "description": "单题时的可选快捷选项(纯文字)。多题时留空,各题选项写在 question 里,勿把多题选项平铺到此数组。"}}}
}},
{"type": "function", "function": {
"name": "start_long_term_update",
+4 -9
View File
@@ -418,26 +418,21 @@ class AgentManager:
except Exception as e:
print(f"get model profiles failed: {e}", file=sys.stderr)
return []
_, mcfg = self._mixin_entry(keys, mk)
members = [str(m) for m in (mcfg.get("llm_nos") or [])] if mcfg else []
active = self.config.get("llmNo", 0)
# collect all mixin members for inMixin check
all_mixin_members: set = set()
for k in keys:
if "mixin" in k:
c = mk.get(k) if isinstance(mk.get(k), dict) else {}
all_mixin_members.update(str(m) for m in (c.get("llm_nos") or []))
out = []
for i, k in enumerate(keys):
cfg = mk.get(k) if isinstance(mk.get(k), dict) else {}
if "mixin" in k:
mems = [str(m) for m in (cfg.get("llm_nos") or [])]
out.append({"id": i, "varName": k, "kind": "mixin", "name": "",
"members": mems, "active": i == active})
"members": members, "active": i == active})
else:
name = self._base_display_name(k, cfg)
out.append({"id": i, "varName": k, "kind": "native", "name": name,
"model": cfg.get("model", ""),
"group": "native" if "native" in k else "std",
"inMixin": name in all_mixin_members, "active": i == active})
"inMixin": name in members, "active": i == active})
return out
def add_to_mixin(self, profile_id: int) -> dict: