Repository navigation
fix(chat): start new-workspace chats on the picked reasoning effort #9631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
harshithmullapudi
wants to merge
3
commits into
main
Choose a base branch
from
superset/effort-default-bug-4f4ecbad
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
dba8c8f
fix(chat): start new-workspace chats on the picked reasoning effort
harshithmullapudi 90ede99
fix(desktop): check the live host version before sending chat effort
harshithmullapudi 96ad140
Merge main into superset/effort-default-bug-4f4ecbad
harshithmullapudi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
1 change: 1 addition & 0 deletions
1
...ashboardNewWorkspaceForm/PromptGroup/hooks/useSubmitWorkspace/utils/launchEffort/index.ts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export { launchEffort } from "./launchEffort"; |
40 changes: 40 additions & 0 deletions
40
...orkspaceForm/PromptGroup/hooks/useSubmitWorkspace/utils/launchEffort/launchEffort.test.ts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| import { describe, expect, test } from "bun:test"; | ||
| import { launchEffort } from "./launchEffort"; | ||
|
|
||
| describe("launchEffort", () => { | ||
| test("a chat launch carries the picked effort to a host that applies it", () => { | ||
| expect( | ||
| launchEffort("high", { | ||
| openAsChat: true, | ||
| hostLaunchesChatWithEffort: true, | ||
| }), | ||
| ).toBe("high"); | ||
| }); | ||
|
|
||
| test("a chat launch drops the effort for an older host, which would open a terminal", () => { | ||
| expect( | ||
| launchEffort("high", { | ||
| openAsChat: true, | ||
| hostLaunchesChatWithEffort: false, | ||
| }), | ||
| ).toBeUndefined(); | ||
| }); | ||
|
|
||
| test("a terminal launch always carries the effort", () => { | ||
| expect( | ||
| launchEffort("max", { | ||
| openAsChat: false, | ||
| hostLaunchesChatWithEffort: false, | ||
| }), | ||
| ).toBe("max"); | ||
| }); | ||
|
|
||
| test("no pick sends no effort", () => { | ||
| expect( | ||
| launchEffort(null, { | ||
| openAsChat: true, | ||
| hostLaunchesChatWithEffort: true, | ||
| }), | ||
| ).toBeUndefined(); | ||
| }); | ||
| }); |
7 changes: 7 additions & 0 deletions
7
...dNewWorkspaceForm/PromptGroup/hooks/useSubmitWorkspace/utils/launchEffort/launchEffort.ts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| export function launchEffort( | ||
| selectedEffort: string | null, | ||
| launch: { openAsChat: boolean; hostLaunchesChatWithEffort: boolean }, | ||
| ): string | undefined { | ||
| if (launch.openAsChat && !launch.hostLaunchesChatWithEffort) return undefined; | ||
| return selectedEffort ?? undefined; | ||
| } |
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refresh the host version before the chat launch gate uses it.
The New Workspace launch decides whether to send
effortfrom the cached host version for the launch URL. Only the in-app host update path invalidates that cache entry. If the host at that URL is replaced by an older build through another path, the cache can still report a compatible version. A chat launch can then sendeffortto a host that cannot run it, and the launch opens a terminal instead of a chat.Invalidate the host-service info query when the host at a URL changes. Alternatively, obtain a current version before the submit gate reads it. Either approach keeps the 2.0.9 gate tied to the host that receives the launch.