treg
superdesigndev
OpenRouter for agent tools. Join community here: https://discord.gg/6mQYYfFMAn
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:wangchai1527-prog/ternaryfox-sidebar
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
TernaryFox 终端的 DSH 侧栏插件:右侧边栏原生「Ternary 终端」Tab(登录 / 话题列表 / 流式聊天), 不嵌 iframe、零用户配置。
DSH GUI 侧栏 Tab(client.js,原生 React,betterSidebar tab)
│ 同源 fetch /tfapi/api/agent/chat(SSE 流式)
▼
宿主半区(index.js):/tfapi/* 前缀代理 → http://127.0.0.1:8961(tf-gateway)
│ 转发 cookie / body;Set-Cookie 落在 DSH 同源,无 CORS
▼
tf-gateway(/root/ternaryfox/runtime/api,已有,不动)
dsh plugin --profile web add github:<owner>/ternaryfox-sidebar
或 GUI 插件市场搜索安装。本地开发用 link:
dsh plugin --profile web add /root/ternaryfox/code/dsh/ternaryfox-sidebar
装完需重启一次 web profile(宿主半区新增了 /tfapi 路由);之后 client.js 改动走
patchReload: live 热生效。
gateway 地址默认 http://127.0.0.1:8961,可在 profile 的 cordis.patch.yml 覆盖:
- insert:
- id: ternaryfox-sidebar
name: ternaryfox-sidebar
config:
gateway: http://127.0.0.1:8961
tf-gateway 需在本机运行(Tab 内置健康自检,未启动会给出启动命令):
cd /root/ternaryfox/runtime/api && .venv/bin/python -m uvicorn main:app --host 127.0.0.1 --port 8961
POST /api/auth/login {email,password} → cookie 会话GET /api/agent/sessions 话题列表GET /api/agent/sessions/{sid}/events 历史事件POST /api/agent/chat(SSE:session / user_message / assistant_delta / assistant_message /
tool_call / tool_result / card / turn_done / turn_failed / replay_done)登录 + 话题列表 + 新建话题 + 流式聊天(含工具调用提示)。策略/券商/设置面板为后续迭代。
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: api。