feat(tui): infer workspace agent when launching TUI#39591
feat(tui): infer workspace agent when launching TUI#39591altaywtf merged 5 commits intoopenclaw:mainfrom
Conversation
Greptile SummaryThis PR adds workspace-based agent inference to the TUI startup flow. When Key implementation details:
No issues found. Path normalization is applied consistently to both sides of every comparison. The explicit-session-wins contract is properly enforced before workspace inference is attempted. The workspace-inferred agent ID is already normalized and gracefully handled by the existing TUI state reconciliation in case the inferred agent is not present in the live server agent list. Confidence Score: 5/5
Last reviewed commit: 2968436 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7d7fa771ef
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
9741729 to
2968436
Compare
|
@codex review |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
2968436 to
23533e2
Compare
|
Merged via squash.
Thanks @arceus77-7! |
Merged via squash. Prepared head SHA: 23533e2 Co-authored-by: arceus77-7 <[email protected]> Co-authored-by: altaywtf <[email protected]> Reviewed-by: @altaywtf
Merged via squash. Prepared head SHA: 23533e2 Co-authored-by: arceus77-7 <[email protected]> Co-authored-by: altaywtf <[email protected]> Reviewed-by: @altaywtf
Merged via squash. Prepared head SHA: 23533e2 Co-authored-by: arceus77-7 <[email protected]> Co-authored-by: altaywtf <[email protected]> Reviewed-by: @altaywtf
Merged via squash. Prepared head SHA: 23533e2 Co-authored-by: arceus77-7 <[email protected]> Co-authored-by: altaywtf <[email protected]> Reviewed-by: @altaywtf
Merged via squash. Prepared head SHA: 23533e2 Co-authored-by: arceus77-7 <[email protected]> Co-authored-by: altaywtf <[email protected]> Reviewed-by: @altaywtf
Merged via squash. Prepared head SHA: 23533e2 Co-authored-by: arceus77-7 <[email protected]> Co-authored-by: altaywtf <[email protected]> Reviewed-by: @altaywtf (cherry picked from commit 492fe67)
…1253) Merged via squash. Prepared head SHA: 23533e2 Co-authored-by: arceus77-7 <[email protected]> Co-authored-by: altaywtf <[email protected]> Reviewed-by: @altaywtf (cherry picked from commit 492fe67) Co-authored-by: arceus77-7 <[email protected]>
Merged via squash. Prepared head SHA: 23533e2 Co-authored-by: arceus77-7 <[email protected]> Co-authored-by: altaywtf <[email protected]> Reviewed-by: @altaywtf
Merged via squash. Prepared head SHA: 23533e2 Co-authored-by: arceus77-7 <[email protected]> Co-authored-by: altaywtf <[email protected]> Reviewed-by: @altaywtf
Summary
When
openclaw tuiis started from inside an agent workspace directory, TUI now infers that agent and uses it for default session routing.This makes local workspace workflows feel automatic:
workspace-ops→ default session routes toopsworkspace-main→ default session routes tomainBehavior
resolveAgentIdsByWorkspacePath(cfg, workspacePath)resolveAgentIdByWorkspacePath(cfg, workspacePath)--session agent:<id>:...keeps that explicit agent.Code changes
src/agents/agent-scope.tssrc/tui/tui.tsresolveInitialTuiAgentId(...)docs/cli/tui.mdTests
Added/updated tests for:
agent:session override behaviorExecuted:
npx vitest run src/agents/agent-scope.test.ts src/tui/tui.test.ts src/cli/program.smoke.test.ts