feat(mcp): add preset setup and capability mentions
This commit is contained in:
@@ -56,6 +56,20 @@ def test_list_sessions_includes_user_preview(tmp_path):
|
||||
assert rows[0]["preview"] == "帮我总结一下 OpenAI 的最新硬件计划"
|
||||
|
||||
|
||||
def test_list_sessions_bounds_preview_scan(tmp_path):
|
||||
manager = SessionManager(tmp_path)
|
||||
session = manager.get_or_create("websocket:chat-long-preview")
|
||||
for index in range(220):
|
||||
session.add_message("assistant", f"assistant trace {index}")
|
||||
session.add_message("user", "this should not force a full sidebar scan")
|
||||
manager.save(session)
|
||||
|
||||
rows = manager.list_sessions()
|
||||
|
||||
assert rows[0]["key"] == "websocket:chat-long-preview"
|
||||
assert rows[0]["preview"] == "assistant trace 0"
|
||||
|
||||
|
||||
# --- Original regression test (from PR 2075) ---
|
||||
|
||||
def test_get_history_drops_orphan_tool_results_when_window_cuts_tool_calls():
|
||||
|
||||
Reference in New Issue
Block a user