fix: remove verbose tool logs from UI + symlink config/tht.yaml

Two fixes:
1. Revert tool_execution_* forwarding: these cluttered the UI with raw
   bash/read output the user never asked for. Only text_delta, system_event
   and ui_request are forwarded, as before.

2. tht ignores THT_CONFIG env var and always looks for config/tht.yaml
   relative to CWD. Create a symlink so the PI agent can run tht commands
   without -c flag.
This commit is contained in:
User
2026-07-13 00:29:28 +02:00
parent 34f1fa271f
commit 664d392859
2 changed files with 4 additions and 5 deletions
+2 -5
View File
@@ -29,11 +29,8 @@ export class SessionBridge {
this.fan({ type: "text_delta", text: m.assistantMessageEvent.delta ?? "" });
} else if (m.type === "text_delta") {
this.fan({ type: "text_delta", text: m.text ?? "" });
} else if (m.type === "tool_execution_start") {
this.fan({ type: "info", level: "info", text: `▶ ${m.toolName ?? "tool"}: ${JSON.stringify(m.args ?? {}).slice(0, 200)}` });
} else if (m.type === "tool_execution_end") {
const summary = m.result?.content?.[0]?.text?.slice(0, 200) ?? "";
this.fan({ type: "info", level: "info", text: summary ? `✓ ${m.toolName ?? "tool"}: ${summary}` : `✓ ${m.toolName ?? "tool"}` });
// tool_execution_* events are intentionally NOT forwarded: they clutter
// the UI with raw bash/read output the user did not ask for.
} else if (m.type === "system_event") {
this.fan(m as ClientEvent);
} else if (m.type === "agent_end") {
+2
View File
@@ -43,6 +43,8 @@ RUN python -m venv /opt/venv \
&& /opt/venv/bin/pip install --no-cache-dir --upgrade pip \
&& (cd /app/harness && /opt/venv/bin/pip install --no-cache-dir .) \
&& cp /app/harness/workflow.yaml /opt/venv/lib/python3.12/site-packages/workflow.yaml
# tht cerca config/tht.yaml relativo al CWD (ignora THT_CONFIG env). Symlink al workspace attivo.
RUN mkdir -p /app/harness/config && ln -sf /app/harness/workspaces/local.yaml /app/harness/config/tht.yaml
# PiProcessManager (backend) prepende harnessDir/.venv/bin al PATH del child Pi → symlink al venv reale
RUN ln -s /opt/venv /app/harness/.venv