diff options
Diffstat (limited to 'packages/desktop/src')
| -rw-r--r-- | packages/desktop/src/pages/layout.tsx | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/packages/desktop/src/pages/layout.tsx b/packages/desktop/src/pages/layout.tsx index 65a106708..e9f10e3a2 100644 --- a/packages/desktop/src/pages/layout.tsx +++ b/packages/desktop/src/pages/layout.tsx @@ -38,6 +38,7 @@ import { Dialog } from "@opencode-ai/ui/dialog" import { iife } from "@opencode-ai/util/iife" import { List, ListRef } from "@opencode-ai/ui/list" import { Input } from "@opencode-ai/ui/input" +import { showToast, Toast } from "@opencode-ai/ui/toast" import { useGlobalSDK } from "@/context/global-sdk" export default function Layout(props: ParentProps) { @@ -760,6 +761,12 @@ export default function Layout(props: ParentProps) { }) await globalSDK.client.global.dispose() setTimeout(() => { + showToast({ + variant: "success", + icon: "circle-check", + title: `${provider().name} connected`, + description: `${provider().name} models are now available to use.`, + }) layout.connect.complete() }, 500) } @@ -792,8 +799,8 @@ export default function Layout(props: ParentProps) { </Match> <Match when={true}> <div class="text-14-regular text-text-base"> - Enter your {provider.name} API key to connect your account and use {provider.name}{" "} - models in OpenCode. + Enter your {provider().name} API key to connect your account and use{" "} + {provider().name} models in OpenCode. </div> </Match> </Switch> @@ -801,7 +808,7 @@ export default function Layout(props: ParentProps) { <Input autofocus type="text" - label={`${provider.name} API key`} + label={`${provider().name} API key`} placeholder="API key" name="apiKey" value={formStore.value} @@ -825,6 +832,7 @@ export default function Layout(props: ParentProps) { })} </Show> </div> + <Toast.Region /> </div> ) } |
