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:
@@ -29,11 +29,8 @@ export class SessionBridge {
|
|||||||
this.fan({ type: "text_delta", text: m.assistantMessageEvent.delta ?? "" });
|
this.fan({ type: "text_delta", text: m.assistantMessageEvent.delta ?? "" });
|
||||||
} else if (m.type === "text_delta") {
|
} else if (m.type === "text_delta") {
|
||||||
this.fan({ type: "text_delta", text: m.text ?? "" });
|
this.fan({ type: "text_delta", text: m.text ?? "" });
|
||||||
} else if (m.type === "tool_execution_start") {
|
// tool_execution_* events are intentionally NOT forwarded: they clutter
|
||||||
this.fan({ type: "info", level: "info", text: `▶ ${m.toolName ?? "tool"}: ${JSON.stringify(m.args ?? {}).slice(0, 200)}` });
|
// the UI with raw bash/read output the user did not ask for.
|
||||||
} 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"}` });
|
|
||||||
} else if (m.type === "system_event") {
|
} else if (m.type === "system_event") {
|
||||||
this.fan(m as ClientEvent);
|
this.fan(m as ClientEvent);
|
||||||
} else if (m.type === "agent_end") {
|
} else if (m.type === "agent_end") {
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ RUN python -m venv /opt/venv \
|
|||||||
&& /opt/venv/bin/pip install --no-cache-dir --upgrade pip \
|
&& /opt/venv/bin/pip install --no-cache-dir --upgrade pip \
|
||||||
&& (cd /app/harness && /opt/venv/bin/pip install --no-cache-dir .) \
|
&& (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
|
&& 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
|
# PiProcessManager (backend) prepende harnessDir/.venv/bin al PATH del child Pi → symlink al venv reale
|
||||||
RUN ln -s /opt/venv /app/harness/.venv
|
RUN ln -s /opt/venv /app/harness/.venv
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user