refactor: archive GUI clients; keep minimal TUI with hooks/API
Move Qt/Tauri/full Web SPA under archive/, ship hermit as CLI/TUI plus libcstcore and cst-webui/1 HTTP+SSE (turn lifecycle hooks, capabilities). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -166,9 +166,23 @@ def messages(base):
|
||||
return call(base, "/api/session")[1].get("messages", [])
|
||||
|
||||
|
||||
def _is_prompt(m):
|
||||
"""Real user prompts only — skip notes, tool results, and engine meta rows."""
|
||||
if m.get("role") != "user" or m.get("note") or m.get("tool_result"):
|
||||
return False
|
||||
c = m.get("content")
|
||||
if not isinstance(c, str) or not c:
|
||||
return False
|
||||
kind = (m.get("meta") or {}).get("kind") if isinstance(m.get("meta"), dict) else None
|
||||
if kind:
|
||||
return False
|
||||
if c.startswith("[cst"):
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
def prompts(base):
|
||||
return [m["content"] for m in messages(base)
|
||||
if m["role"] == "user" and not m.get("note") and not m.get("tool_result")]
|
||||
return [m["content"] for m in messages(base) if _is_prompt(m)]
|
||||
|
||||
|
||||
def answers(base):
|
||||
|
||||
Reference in New Issue
Block a user