Skip to content

Commit 66bc5e7

Browse files
Merge branch 'dev' into fix/24286-web-ui-version-mismatch
2 parents 6d9efab + d08feda commit 66bc5e7

96 files changed

Lines changed: 2812 additions & 1666 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

bun.lock

Lines changed: 30 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

infra/stats.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export const app = new sst.cloudflare.x.SolidStart("Stats", {
165165
domain: `stats.${domain}`,
166166
link: [database, EMAILOCTOPUS_API_KEY],
167167
environment: {
168-
PUBLIC_URL: `https://stats.${domain}/stats`,
168+
PUBLIC_URL: `https://${domain}/stats`,
169169
},
170170
})
171171

nix/hashes.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"nodeModules": {
3-
"x86_64-linux": "sha256-fzplLKjzYefVCRhAgfCWWIa3me2JiI2d9kDBACnz4fA=",
4-
"aarch64-linux": "sha256-gccipj2CAau/lZ7KTQhdeU8n6fcXDuUt4X4XbNufCko=",
5-
"aarch64-darwin": "sha256-r0QEetxKUf6HrtMOozyvb4jjEJjVtp+DE8aiKKhRrVI=",
6-
"x86_64-darwin": "sha256-bU+5WudkiIflFgoqgLSf30iqeNNLuEbScI5oMFPu9eM="
3+
"x86_64-linux": "sha256-rQ8kz/fChREJWnwY2Jp2zp06TYesyd3hia44hdo8l+s=",
4+
"aarch64-linux": "sha256-t5WKzAN8NRO/4g2l+4V5SatK/LO3ZPBfmKjJFf/MsD4=",
5+
"aarch64-darwin": "sha256-QbNaxGNiKdJ0/mKaTUk392qsOvlRYVi5mTuMmFByEic=",
6+
"x86_64-darwin": "sha256-lewm6WvqxphR+rvXz9e7ZKvgu98MH3cxosvQkz3mLuA="
77
}
88
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"lint": "oxlint",
1616
"typecheck": "bun turbo typecheck",
1717
"upgrade-opentui": "bun run script/upgrade-opentui.ts",
18-
"postinstall": "bun run --cwd packages/opencode fix-node-pty",
18+
"postinstall": "bun run --cwd packages/core fix-node-pty",
1919
"prepare": "husky",
2020
"random": "echo 'Random script'",
2121
"sso": "aws sso login --sso-session=opencode --no-browser",

packages/app/src/app.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import { CommentsProvider } from "@/context/comments"
3333
import { FileProvider } from "@/context/file"
3434
import { ServerSDKProvider } from "@/context/server-sdk"
3535
import { ServerSyncProvider } from "@/context/server-sync"
36+
import { GlobalProvider } from "@/context/global"
3637
import { HighlightsProvider } from "@/context/highlights"
3738
import { LanguageProvider, type Locale, useLanguage } from "@/context/language"
3839
import { LayoutProvider } from "@/context/layout"
@@ -47,7 +48,6 @@ import DirectoryLayout from "@/pages/directory-layout"
4748
import Layout from "@/pages/layout"
4849
import { ErrorPage } from "./pages/error"
4950
import { useCheckServerHealth } from "./utils/server-health"
50-
import { ServersProvider } from "./context/servers"
5151

5252
const HomeRoute = lazy(() => import("@/pages/home"))
5353
const Session = lazy(() => import("@/pages/session"))
@@ -316,7 +316,7 @@ export function AppInterface(props: {
316316
}) {
317317
return (
318318
<ServerProvider defaultServer={props.defaultServer} servers={props.servers}>
319-
<ServersProvider>
319+
<GlobalProvider defaultServer={props.defaultServer} servers={props.servers}>
320320
<ConnectionGate disableHealthCheck={props.disableHealthCheck}>
321321
<ServerKey>
322322
<QueryProvider>
@@ -337,7 +337,7 @@ export function AppInterface(props: {
337337
</QueryProvider>
338338
</ServerKey>
339339
</ConnectionGate>
340-
</ServersProvider>
340+
</GlobalProvider>
341341
</ServerProvider>
342342
)
343343
}

packages/app/src/components/dialog-connect-provider.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ export function DialogConnectProvider(props: { provider: string }) {
277277
<div class="text-14-regular text-text-base">{select()?.message}</div>
278278
<div>
279279
<List
280+
class="px-3"
280281
items={select()?.options ?? []}
281282
key={(x) => x.value}
282283
current={select()?.options.find((x) => x.value === formStore.value[select()!.key])}
@@ -364,6 +365,7 @@ export function DialogConnectProvider(props: { provider: string }) {
364365
</div>
365366
<div>
366367
<List
368+
class="px-3"
367369
ref={(ref) => {
368370
listRef = ref
369371
}}

packages/app/src/components/dialog-fork.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export const DialogFork: Component = () => {
8888
return (
8989
<Dialog title={language.t("command.session.fork")}>
9090
<List
91-
class="flex-1 min-h-0 [&_[data-slot=list-scroll]]:flex-1 [&_[data-slot=list-scroll]]:min-h-0"
91+
class="flex-1 px-3 min-h-0 [&_[data-slot=list-scroll]]:flex-1 [&_[data-slot=list-scroll]]:min-h-0"
9292
search={{ placeholder: language.t("common.search.placeholder"), autofocus: true }}
9393
emptyMessage={language.t("dialog.fork.empty")}
9494
key={(x) => x.id}

packages/app/src/components/dialog-manage-models.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export const DialogManageModels: Component = () => {
3939
}
4040
>
4141
<List
42+
class="px-3"
4243
search={{ placeholder: language.t("dialog.model.search.placeholder"), autofocus: true }}
4344
emptyMessage={language.t("dialog.model.empty")}
4445
key={(x) => `${x?.provider?.id}:${x?.id}`}

packages/app/src/components/dialog-select-directory.tsx

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@ import type { ListRef } from "@opencode-ai/ui/list"
66
import { getDirectory, getFilename } from "@opencode-ai/core/util/path"
77
import fuzzysort from "fuzzysort"
88
import { createMemo, createResource, createSignal } from "solid-js"
9-
import { useServerSDK } from "@/context/server-sdk"
10-
import { useServerSync } from "@/context/server-sync"
11-
import { useLayout } from "@/context/layout"
9+
import { ServerSDK } from "@/context/server-sdk"
1210
import { useLanguage } from "@/context/language"
11+
import { ServerConnection } from "@/context/server"
12+
import { useGlobal } from "@/context/global"
1313

1414
interface DialogSelectDirectoryProps {
1515
title?: string
1616
multiple?: boolean
1717
onSelect: (result: string | string[] | null) => void
18+
server: ServerConnection.Any
1819
}
1920

2021
type Row = {
@@ -127,11 +128,7 @@ function uniqueRows(rows: Row[]) {
127128
})
128129
}
129130

130-
function useDirectorySearch(args: {
131-
sdk: ReturnType<typeof useServerSDK>
132-
start: () => string | undefined
133-
home: () => string
134-
}) {
131+
function useDirectorySearch(args: { sdk: ServerSDK; start: () => string | undefined; home: () => string }) {
135132
const cache = new Map<string, Promise<Array<{ name: string; absolute: string }>>>()
136133
let current = 0
137134

@@ -246,9 +243,8 @@ function useDirectorySearch(args: {
246243
}
247244

248245
export function DialogSelectDirectory(props: DialogSelectDirectoryProps) {
249-
const sync = useServerSync()
250-
const sdk = useServerSDK()
251-
const layout = useLayout()
246+
const global = useGlobal()
247+
const { sync, sdk, ...serverCtx } = global.createServerCtx(props.server)
252248
const dialog = useDialog()
253249
const language = useLanguage()
254250

@@ -279,7 +275,7 @@ export function DialogSelectDirectory(props: DialogSelectDirectoryProps) {
279275
})
280276

281277
const recentProjects = createMemo(() => {
282-
const projects = layout.projects.list()
278+
const projects = serverCtx.projects.list()
283279
const byProject = new Map<string, number>()
284280

285281
for (const project of projects) {
@@ -324,6 +320,7 @@ export function DialogSelectDirectory(props: DialogSelectDirectoryProps) {
324320
return (
325321
<Dialog title={props.title ?? language.t("command.project.open")}>
326322
<List
323+
class="px-3"
327324
search={{ placeholder: language.t("dialog.directory.search.placeholder"), autofocus: true }}
328325
emptyMessage={language.t("dialog.directory.empty")}
329326
loadingMessage={language.t("common.loading")}

packages/app/src/components/dialog-select-file.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@ export function DialogSelectFile(props: { mode?: DialogSelectFileMode; onOpenFil
386386
return (
387387
<Dialog class="pt-3 pb-0 !max-h-[480px]" transition>
388388
<List
389+
class="px-3"
389390
search={{
390391
placeholder: filesOnly()
391392
? language.t("session.header.searchFiles")

0 commit comments

Comments
 (0)