refactor: clean CLI taxonomy — canonical subcommands, merged memory.update, no aliases

- calendar: split write → create/read/update/delete/share
- contacts: rename lookup → read
- memory: merge write+forget → update (unified action field in operations)
- Remove all alias/normalization logic from adapter and handlers
- Update tool_postprocessor ui_hints builders to canonical keys
- Remove frontend legacy TOOL_CALL_START/ARGS/END events and ToolCallItem
- Update SKILL.md files and protocol docs
- Update tests and settings screens
This commit is contained in:
qzl
2026-04-23 12:12:41 +08:00
parent 91077a933d
commit 19e273a9e6
48 changed files with 1578 additions and 811 deletions
+21 -3
View File
@@ -413,7 +413,7 @@ async def test_enqueue_run_rejects_too_many_attachments(monkeypatch) -> None:
@pytest.mark.asyncio
async def test_get_history_snapshot_filters_out_tool_messages() -> None:
async def test_get_history_snapshot_keeps_tool_messages_for_ui_replay() -> None:
class _HistoryRepository(_FakeRepository):
async def get_history_day(
self,
@@ -446,7 +446,20 @@ async def test_get_history_snapshot_filters_out_tool_messages() -> None:
"tool_name": "calendar_read",
"tool_call_id": "call-1",
"status": "success",
"result": "status=success total=3 returned=3",
"result": {
"command": "calendar",
"subcommand": "read",
"data": {"total": 3, "items": []},
},
"ui_hints": {
"intent": "status",
"status": "success",
"title": "完成",
"items": [],
"listItems": [],
"sections": [],
"actions": [],
},
},
},
"timestamp": "2026-03-17T09:00:01Z",
@@ -482,7 +495,12 @@ async def test_get_history_snapshot_filters_out_tool_messages() -> None:
current_user=_user(),
)
assert [message.role for message in snapshot.messages] == ["user", "assistant"]
assert [message.role for message in snapshot.messages] == [
"user",
"tool",
"assistant",
]
assert snapshot.messages[1].ui_schema is not None
@pytest.mark.asyncio