GeezerVison is showing github.com — chore: generate · ildella/opencode@4810df0
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: packages/app/src/components/dialog-connect-provider.tsx +6-6Lines changed: 6 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -158,8 +158,8 @@ export function DialogConnectProvider(props: { provider: string }) { | 158 | 158 | } | 159 | 159 | dispatch({ type: "auth.pending" }) | 160 | 160 | const start = Date.now() | 161 | | - await serverSDK().client.provider.oauth | 162 | | - .authorize( | | 161 | + await serverSDK() | | 162 | + .client.provider.oauth.authorize( | 163 | 163 | { | 164 | 164 | providerID: props.provider, | 165 | 165 | method: index, | @@ -480,8 +480,8 @@ export function DialogConnectProvider(props: { provider: string }) { | 480 | 480 | } | 481 | 481 |
| 482 | 482 | setFormStore("error", undefined) | 483 | | - const result = await serverSDK().client.provider.oauth | 484 | | - .callback({ | | 483 | + const result = await serverSDK() | | 484 | + .client.provider.oauth.callback({ | 485 | 485 | providerID: props.provider, | 486 | 486 | method: store.methodIndex, | 487 | 487 | code, | @@ -533,8 +533,8 @@ export function DialogConnectProvider(props: { provider: string }) { | 533 | 533 |
| 534 | 534 | onMount(() => { | 535 | 535 | void (async () => { | 536 | | - const result = await serverSDK().client.provider.oauth | 537 | | - .callback({ | | 536 | + const result = await serverSDK() | | 537 | + .client.provider.oauth.callback({ | 538 | 538 | providerID: props.provider, | 539 | 539 | method: store.methodIndex, | 540 | 540 | }) | |
Collapse file Copy file name to clipboardExpand all lines: packages/app/src/components/dialog-fork.tsx +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -68,8 +68,8 @@ export const DialogFork: Component = () => { | 68 | 68 | }) | 69 | 69 | const dir = base64Encode(sdk().directory) | 70 | 70 |
| 71 | | - sdk().client.session | 72 | | - .fork({ sessionID, messageID: item.id }) | | 71 | + sdk() | | 72 | + .client.session.fork({ sessionID, messageID: item.id }) | 73 | 73 | .then((forked) => { | 74 | 74 | if (!forked.data) { | 75 | 75 | showToast({ title: language.t("common.requestFailed") }) | |
Collapse file Copy file name to clipboardExpand all lines: packages/app/src/components/prompt-input/submit.ts +10-8Lines changed: 10 additions & 8 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -247,8 +247,8 @@ export function createPromptSubmit(input: PromptSubmitInput) { | 247 | 247 | pending.delete(key) | 248 | 248 | return Promise.resolve() | 249 | 249 | } | 250 | | - return sdk().client.session | 251 | | - .abort({ | | 250 | + return sdk() | | 251 | + .client.session.abort({ | 252 | 252 | sessionID, | 253 | 253 | }) | 254 | 254 | .catch(() => {}) | @@ -559,12 +559,14 @@ export function createPromptSubmit(input: PromptSubmitInput) { | 559 | 559 | }, timeoutMs) | 560 | 560 | }) | 561 | 561 |
| 562 | | - const result = await Promise.race([WorktreeState.wait(sdk().scope, sessionDirectory), abortWait, timeout]).finally( | 563 | | - () => { | 564 | | - if (timer.id === undefined) return | 565 | | - clearTimeout(timer.id) | 566 | | - }, | 567 | | - ) | | 562 | + const result = await Promise.race([ | | 563 | + WorktreeState.wait(sdk().scope, sessionDirectory), | | 564 | + abortWait, | | 565 | + timeout, | | 566 | + ]).finally(() => { | | 567 | + if (timer.id === undefined) return | | 568 | + clearTimeout(timer.id) | | 569 | + }) | 568 | 570 | pending.delete(pendingKey(session.id)) | 569 | 571 | if (controller.signal.aborted) return false | 570 | 572 | if (result.status === "failed") throw new Error(result.message) | |
Collapse file Copy file name to clipboardExpand all lines: packages/app/src/components/settings-general.tsx +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -127,8 +127,8 @@ export const SettingsGeneral: Component = () => { | 127 | 127 |
| 128 | 128 | const [shells] = createResource( | 129 | 129 | () => | 130 | | - serverSdk().client.pty | 131 | | - .shells() | | 130 | + serverSdk() | | 131 | + .client.pty.shells() | 132 | 132 | .then((res) => res.data ?? []) | 133 | 133 | .catch(() => [] as ShellOption[]), | 134 | 134 | { initialValue: [] as ShellOption[] }, | |
Collapse file Copy file name to clipboardExpand all lines: packages/app/src/components/settings-providers.tsx +5-3Lines changed: 5 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -114,12 +114,14 @@ const SettingsProvidersContent: Component = () => { | 114 | 114 |
| 115 | 115 | const disconnect = async (providerID: string, name: string) => { | 116 | 116 | if (isConfigCustom(providerID)) { | 117 | | - await serverSDK().client.auth.remove({ providerID }).catch(() => undefined) | | 117 | + await serverSDK() | | 118 | + .client.auth.remove({ providerID }) | | 119 | + .catch(() => undefined) | 118 | 120 | await disableProvider(providerID, name) | 119 | 121 | return | 120 | 122 | } | 121 | | - await serverSDK().client.auth | 122 | | - .remove({ providerID }) | | 123 | + await serverSDK() | | 124 | + .client.auth.remove({ providerID }) | 123 | 125 | .then(async () => { | 124 | 126 | await serverSDK().client.global.dispose() | 125 | 127 | showToast({ | |
Collapse file Copy file name to clipboardExpand all lines: packages/app/src/components/settings-v2/general.tsx +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -126,8 +126,8 @@ export const SettingsGeneralV2: Component = () => { | 126 | 126 |
| 127 | 127 | const [shells] = createResource( | 128 | 128 | () => | 129 | | - serverSdk().client.pty | 130 | | - .shells() | | 129 | + serverSdk() | | 130 | + .client.pty.shells() | 131 | 131 | .then((res) => res.data ?? []) | 132 | 132 | .catch(() => [] as ShellOption[]), | 133 | 133 | { initialValue: [] as ShellOption[] }, | |
Collapse file Copy file name to clipboardExpand all lines: packages/app/src/components/settings-v2/providers.tsx +5-3Lines changed: 5 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -108,12 +108,14 @@ export const SettingsProvidersV2: Component = () => { | 108 | 108 |
| 109 | 109 | const disconnect = async (providerID: string, name: string) => { | 110 | 110 | if (isConfigCustom(providerID)) { | 111 | | - await serverSdk().client.auth.remove({ providerID }).catch(() => undefined) | | 111 | + await serverSdk() | | 112 | + .client.auth.remove({ providerID }) | | 113 | + .catch(() => undefined) | 112 | 114 | await disableProvider(providerID, name) | 113 | 115 | return | 114 | 116 | } | 115 | | - await serverSdk().client.auth | 116 | | - .remove({ providerID }) | | 117 | + await serverSdk() | | 118 | + .client.auth.remove({ providerID }) | 117 | 119 | .then(async () => { | 118 | 120 | await serverSdk().client.global.dispose() | 119 | 121 | showToast({ | |
Collapse file Copy file name to clipboardExpand all lines: packages/app/src/context/file.tsx +12-7Lines changed: 12 additions & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -78,7 +78,10 @@ export const { use: useFile, provider: FileProvider } = createSimpleContext({ | 78 | 78 | const tree = createFileTreeStore({ | 79 | 79 | scope, | 80 | 80 | normalizeDir: path.normalizeDir, | 81 | | - list: (dir) => sdk().client.file.list({ path: dir }).then((x) => x.data ?? []), | | 81 | + list: (dir) => | | 82 | + sdk() | | 83 | + .client.file.list({ path: dir }) | | 84 | + .then((x) => x.data ?? []), | 82 | 85 | onError: (message) => { | 83 | 86 | showToast({ | 84 | 87 | variant: "error", | @@ -176,8 +179,8 @@ export const { use: useFile, provider: FileProvider } = createSimpleContext({ | 176 | 179 |
| 177 | 180 | setLoading(file) | 178 | 181 |
| 179 | | - const promise = sdk().client.file | 180 | | - .read({ path: file }) | | 182 | + const promise = sdk() | | 183 | + .client.file.read({ path: file }) | 181 | 184 | .then((x) => { | 182 | 185 | if (scope() !== directory) return | 183 | 186 | const content = x.data | @@ -200,10 +203,12 @@ export const { use: useFile, provider: FileProvider } = createSimpleContext({ | 200 | 203 | } | 201 | 204 |
| 202 | 205 | const search = (query: string, dirs: "true" | "false") => | 203 | | - sdk().client.find.files({ query, dirs }).then( | 204 | | - (x) => (x.data ?? []).map(path.normalize), | 205 | | - () => [], | 206 | | - ) | | 206 | + sdk() | | 207 | + .client.find.files({ query, dirs }) | | 208 | + .then( | | 209 | + (x) => (x.data ?? []).map(path.normalize), | | 210 | + () => [], | | 211 | + ) | 207 | 212 |
| 208 | 213 | const stop = sdk().event.listen((e) => { | 209 | 214 | invalidateFromWatcher(e.details, { | |
Collapse file Copy file name to clipboardExpand all lines: packages/app/src/context/layout.tsx +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -536,8 +536,8 @@ export const { use: useLayout, provider: LayoutProvider } = createSimpleContext( | 536 | 536 | continue | 537 | 537 | } | 538 | 538 |
| 539 | | - void serverSdk().client.project | 540 | | - .update({ projectID: project.id, directory: worktree, icon: { color } }) | | 539 | + void serverSdk() | | 540 | + .client.project.update({ projectID: project.id, directory: worktree, icon: { color } }) | 541 | 541 | .catch(() => { | 542 | 542 | if (colorRequested.get(worktree) === color) colorRequested.delete(worktree) | 543 | 543 | }) | |
Collapse file Copy file name to clipboardExpand all lines: packages/app/src/context/notification.tsx +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -211,8 +211,8 @@ export const { use: useNotification, provider: NotificationProvider } = createSi | 211 | 211 | const [syncStore] = serverSync().child(directory, { bootstrap: false }) | 212 | 212 | const match = Binary.search(syncStore.session, sessionID, (s) => s.id) | 213 | 213 | if (match.found) return syncStore.session[match.index] | 214 | | - return serverSDK().client.session | 215 | | - .get({ directory, sessionID }) | | 214 | + return serverSDK() | | 215 | + .client.session.get({ directory, sessionID }) | 216 | 216 | .then((x) => x.data) | 217 | 217 | .catch(() => undefined) | 218 | 218 | } | |
|