summaryrefslogtreecommitdiff
path: root/src/agentux/web.py
diff options
context:
space:
mode:
authorClaude Code <noreply@anthropic.com>2026-11-27 20:03:34 +0530
committerClaude Code <noreply@anthropic.com>2026-11-27 20:03:34 +0530
commited0a4782a21d8e564f8956c87e022e8caef851ac (patch)
treee65d6e0d0ddc23a1b1b9948a47a53245f0716e90 /src/agentux/web.py
parent95ea8c8b72d2dbb20ab860ab1505b46add280773 (diff)
Commit tracked-file changes required for a working Agentux installHEADmain
The committed provider/base.py, config.py, models.py, errors.py and tools were missing symbols (e.g. TextCallback) that agent.py imports, so a clean clone produced a broken install. Commit these so the remote's committed state is complete and cloneable. Co-Authored-By: Claude Code <noreply@anthropic.com>
Diffstat (limited to 'src/agentux/web.py')
-rw-r--r--src/agentux/web.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/agentux/web.py b/src/agentux/web.py
index 8859cf3..4acb394 100644
--- a/src/agentux/web.py
+++ b/src/agentux/web.py
@@ -192,6 +192,8 @@ class AgentuxWebHandler(SimpleHTTPRequestHandler):
# Hook agent callbacks to SSE
orig_text_cb = self.agent.on_text
self.agent.on_text = lambda token: send_sse("chunk", {"delta": token})
+ orig_event_cb = self.agent.on_event
+ self.agent.on_event = lambda role, text: send_sse(role, {"message": text})
try:
answer = loop.run_until_complete(self.agent.run(prompt, interactive=True))
@@ -238,8 +240,9 @@ class WebServer:
# meant running agentux --web from inside another project that
# happened to have an internal/web/static directory served that
# project's UI instead of Agentux's.
- repo_root = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
- candidate = os.path.join(repo_root, "internal", "web", "static")
+ here = os.path.dirname(os.path.abspath(__file__)) # .../src/agentux
+ repo_root = os.path.dirname(os.path.dirname(here)) # .../agentux
+ candidate = os.path.join(repo_root, "src", "agentux", "web", "static")
if os.path.isdir(candidate):
return candidate
cwd = os.getcwd()