-
Notifications
You must be signed in to change notification settings - Fork 6k
upgrade goose sdk and tui to be compatible with the latest agentclientprotocol/sdk package #8667
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
Changes from 5 commits
21da10e
dd0b6bd
eb9a7d3
bd30682
cb4e572
ae32e96
4c9fb6e
78c96b4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -73,12 +73,10 @@ const ModelSelector = React.memo(function ModelSelector({ | |
| try { | ||
| setLoading(true); | ||
| setError(null); | ||
| const resp = await client.goose.GooseProvidersModels({ | ||
| providerName: provider.name, | ||
| }); | ||
| const knownModels = provider.knownModels?.map((model) => model.name) ?? []; | ||
| if (!cancelled) { | ||
| setModels(resp.models); | ||
| const defaultIdx = resp.models.findIndex((m) => m === provider.defaultModel); | ||
| setModels(knownModels); | ||
| const defaultIdx = knownModels.findIndex((m) => m === provider.defaultModel); | ||
| setSelectedIdx(defaultIdx >= 0 ? defaultIdx : 0); | ||
| setLoading(false); | ||
| clearTimeout(timeoutId); | ||
|
|
@@ -96,7 +94,7 @@ const ModelSelector = React.memo(function ModelSelector({ | |
| cancelled = true; | ||
| clearTimeout(timeoutId); | ||
| }; | ||
| }, [client, provider.name, provider.defaultModel]); | ||
| }, [provider.knownModels, provider.defaultModel]); | ||
|
|
||
| const filtered = (() => { | ||
| if (!searchQuery) return models; | ||
|
|
@@ -432,10 +430,15 @@ export default function ConfigureScreen({ | |
| } | ||
| await client.goose.GooseConfigUpsert({ key: "GOOSE_PROVIDER", value: provider.name }); | ||
| await client.goose.GooseConfigUpsert({ key: "GOOSE_MODEL", value: model }); | ||
| await client.goose.GooseSessionProviderUpdate({ | ||
| await client.setSessionConfigOption({ | ||
| sessionId, | ||
| configId: "provider", | ||
| value: provider.name, | ||
| }); | ||
|
Comment on lines
+411
to
+415
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Splitting session updates into two Useful? React with 👍 / 👎. |
||
| await client.setSessionConfigOption({ | ||
| sessionId, | ||
| provider: provider.name, | ||
| model, | ||
| configId: "model", | ||
| value: model, | ||
| }); | ||
| onComplete(); | ||
| } catch (e: unknown) { | ||
|
|
||
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.
This now builds the model picker from
provider.knownModels, but that field comes from_goose/providers/detailsstatic metadata (crates/goose-acp/src/server.rson_get_provider_details, lines 2839–2846) rather than the runtime inventory/refresh path (_goose/providers/inventory). As a result, providers that discover models dynamically can show an incomplete list here, so valid models may disappear from the picker unless users manually type them. Querying provider inventory for the selected provider (and optionally triggering refresh) would preserve the previous behavior of showing current model options.Useful? React with 👍 / 👎.