8 Commits

Author SHA1 Message Date
Liang Jiaqing 9d99e9fc74 fix: isolate project mode per agent instance 2026-07-10 17:31:52 +08:00
nianyucatfish 84254ad762 feat(tui): workspace 项目模式 + @ 文件引用补全(v2/v3) (#607)
* feat(tui): workspace 项目模式 + @ 文件引用补全(v2/v3)

- workspace: /workspace 设/off/picker、junction 复用 project_mode 记忆、
  per-session(v2)/进程级(v3)、/continue 恢复、session map 持久化绑定状态
- @ 补全(completion-only): 子序列模糊 + path-like 目录补全(~/ / ./ C:\)、
  提交期 @路径作为普通文本交 agent
- v3 filterable 焦点链 picker(输入框作焦点环对象、free_input)
- 新增共享模块 at_complete.py / workspace_cmd.py;核心零改动

* feat(tui): @ 路径绝对化 + 默认根=temp + 未绑显示完整路径

- 默认根 os.getcwd() → agent 工作目录 <GA根>/temp(与 file_read/code_run 一致、不随启动 cwd 飘)
- 提交期 @相对 → @绝对(display 保留相对短路径),让 agent file_read(相对自身 cwd)找得到
- 未绑 workspace 时候选显示完整路径(根不直观);索引忽略 model_responses 会话日志噪音
- 启动预热 temp 索引 + candidates_for 惰性兜底(任何根首次访问自动建)
2026-06-14 09:10:04 +08:00
weijia 90d5002d1f feat(project-mode): pid-keyed anchor — auto-deactivate on GA exit, multi-instance isolation (#592)
- Anchor file becomes temp/.active_project.<host pid>: dies with the GA process,
  so closing GA auto-deactivates; re-activation requires user confirmation per SOP
- Multiple GA instances each keep their own active project, no cross-talk
- Startup sweep removes only legacy unsuffixed anchors and own-pid leftovers
  (pid reuse); anchors of other pids are never touched — deliberately no
  liveness probe, because os.kill(pid, 0) on Windows terminates the process
2026-06-10 14:57:48 +08:00
weijia 1945b27a03 feat: project mode plugin — cross-session project memory via two-layer injection (#591)
Activate a project with a file anchor (temp/.active_project); every turn
the agent_before hook appends an L1 context (rules + memory file pointer
+ wrap-up discipline) to the latest user message, while the full project
memory (L2) stays on disk for the model to read on demand.

Zero core changes: plugin + SOP + gitignore whitelist only.
2026-06-10 13:18:38 +08:00
desmonna 211f814624 fix: add plugins/__init__.py for proper package recognition 2026-06-01 14:20:36 +08:00
cv70 e0e7487409 feat: add agent lifecycle hook trigger mechanism 2026-05-21 14:33:56 +08:00
desmonna 8b2cb65166 refactor(langfuse/chatapp):
- Fix 1: _patched_log function signature mismatch
  - Location: plugins-langfuse_tracing.py
  - Problem: monkey-patch function only accepts 2 parameters, but the original function has 3 parameters (including the default parameter log_path)
  - Fix: add log_path=None parameter and pass it to the original function
- Fix 2: Agentmain module import failure
  - Location: frontends-chatapp_common.py
  - Problem: frontends directory cannot be imported into the agentmain of the upper directory
  - Fix: Add the parent directory to sys.path at the beginning of the file
2026-05-14 22:46:06 +08:00
Jiaqing Liang 27203ee5e6 refactor: plugins dir + opt-in langfuse via __getattr__ guard
- mv langfuse_tracing.py -> plugins/langfuse_tracing.py
- llmcore: load plugin lazily inside __getattr__ when langfuse_config present
  (PEP 562 module __getattr__ naturally fires only once after globals().update)
- llmcore: extract _record_usage() from 4 scattered [Cache] print sites
- agentmain: /resume scans only latest 10 files
2026-04-20 15:56:06 +08:00