fix: preserve subtask output and refresh TUI session after provider auth#18429
Open
RhoninSeiei wants to merge 3 commits intoanomalyco:devfrom
Open
fix: preserve subtask output and refresh TUI session after provider auth#18429RhoninSeiei wants to merge 3 commits intoanomalyco:devfrom
RhoninSeiei wants to merge 3 commits intoanomalyco:devfrom
Conversation
Contributor
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
95b2e05 to
0bd2994
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #18423
Closes #18427
Type of change
What does this PR do?
taskwas returning the last text part from a subagent session even when that last part was empty, so the orchestrator could receive an empty<task_result>after a tool call. This change now prefers the last non-empty text part and only falls back to the literal last text part when every text part is empty.The TUI provider auth dialog was also only calling
sync.bootstrap()after OAuth or API key setup. In an active session, that left the session cache untouched and the message list could stay blank until leaving and reopening the session. This change adds a force option to TUI session sync and refreshes the current session immediately after provider auth succeeds.How did you verify your code works?
test/tool/task.test.tstest/cli/tui/dialog-provider-refresh.test.ts/tmp/bun-install/bun-linux-x64/bun test test/tool/task.test.ts test/cli/tui/dialog-provider-refresh.test.ts --timeout 30000/tmp/bun-install/bun-linux-x64/bun run typecheck./node_modules/.bin/prettier --check packages/opencode/src/tool/task.ts packages/opencode/src/cli/cmd/tui/component/dialog-provider.tsx packages/opencode/src/cli/cmd/tui/component/dialog-provider-refresh.ts packages/opencode/src/cli/cmd/tui/context/sync.tsx packages/opencode/test/tool/task.test.ts packages/opencode/test/cli/tui/dialog-provider-refresh.test.tsbun turbo typecheckScreenshots / recordings
N/A. This TUI change updates session refresh behavior rather than terminal layout.
Checklist