Dashboard › opencode › Distillation
5bc91154-0040-4629-9460-4e540419dcc4["lore_tm_v1_LY1B8obJmfPKEGkRqlzLTkkoc4k7WomoA8Gu9UIcFm8","lore_tm_v1_XIAAFXAdTct3l9zbeqVvXzfnU7dpvf-gaqQgZySF6Jk","lore_tm_v1_aUUwO1f8PtdCX7KN1juAB7p_zQBv7hbF3SbWAVV9lAU","lore_tm_v1_UItcS75aLdcjVYtd1T6JWhoiYfGE8hd8NUH0MwNcQnY","lore_tm_v1_g_gqvrweUJ3EiIFmfVVngj7CaU8OtyucU6y0sC5n1u4","lore_tm_v1_DPi6Gk1_XIxZCiPIuTIyOudanBC9CQcMViwuKYu8lfY","lore_tm_v1_GrjpRxqlQjWB9H09nBFyeLr9c55398PPSnZBfYKn-qE","lore_tm_v1_0ZGnPw0vvT9ealeJO6shL4J4vdUKDV8pBnAKyYivG7Y","lore_tm_v1_7BLVaSC0vRKQGQBWxUji22QHTKdK97i9UxaIieWqow0","lore_tm_v1_oOnIoAzvmS5DXeIofk1UjaEUKyEDWKtAFD7olq3zWD0","lore_tm_v1_o4-Gqr2j6VjsWIBv3HsXruevkQoces5dheibyBWxTsk","lore_tm_v1_I9e3hdCfzak4-yYIn56HbdZG8cW3ICUESq-L5Nke6vc","lore_tm_v1_LujRnZ86vd29JQDbfXfbqLfDaHX5JmoXy1DbVX5H68c","lore_tm_v1_c4mEnACleKGEWklQglSrr3xtoclZguUAJpMbyCTqcDQ","lore_tm_v1_VglTMgVm6w0ExMsizv71OUul_kHLYZu2ryaQ8Nquz08","lore_tm_v1_Sx2HV1CLZXqbjCLj_DG1DeCtOwJM-0ywp3kQfM649ww","lore_tm_v1_qlDG9kKD6Mj3gHbjgnIe0MyGmbMUsA6FrupG_nKMzCE","lore_tm_v1_5-w2ABuI76Kx2qowf-UTWS0dyO2d__fN_iPJxTBIrwc","lore_tm_v1_r835NE-HHzf06la6K0Svl42FtIHzpfQ4ODcdm7AQUTA","lore_tm_v1_Hqe1xJO_Trnz8XkZHRi43FVyuEw95fYHP7h4PaEq21o","lore_tm_v1_OwH1sPOE5IYToBIhyYcRx02RaWbgl9I5MACNV5uQHHY","lore_tm_v1_7zS1CGSCTwi3SD_of_PUCjZZXYV69MjeZXnN8OpUgSk","lore_tm_v1_RKSJM70aWBeqMTJV29VF09HpUJoyjzpykNEDbw1NM1E","lore_tm_v1_XC3fMvGE1ydjOmkAvdFHnM2h05d7grLxhgHulrQsDwI","lore_tm_v1_BJk_VoiZZFOFdD4eKhBkf9S2_nAVj4S_VB7KFMX4iBE","lore_tm_v1_y-jL0E_VC8H7UkSILdwKFauKwJ3iv5FFndMekEdJJys","lore_tm_v1_JJkVzh3-AZG2Hrzb4rA-Nx7tvUF7ur4YgagbJbMhW88"]
Date: Sep 8, 2026
/home/byk/Code/opencode tracing how the web/desktop client loads provider/model lists and creates a new session for a selected project directory..opencode config exists; 5. exact expected log messages/errors.file:line citations, no file edits, and no tests.Found 100 matches (more matches available) and reported that results were truncated to the first 100; matches included client generated sources under /home/byk/Code/opencode/packages/client/src/, opencode server/session tests under /home/byk/Code/opencode/packages/opencode/test/, and /home/byk/Code/opencode/packages/opencode/specs/v2/api.ts./home/byk/Code/opencode/packages/app/src contained 21 entries: addons/, app.tsx, assets/, components/, constants/, context/, custom-elements.d.ts, desktop-menu.test.ts, desktop-menu.ts, entry.tsx, env.d.ts, hooks/, i18n/, index.css, index.ts, pages/, sst-env.d.ts, theme-preload.test.ts, updater.ts, utils/, wsl/./home/byk/Code/opencode/packages/desktop/src contained main/, preload/, and renderer/.Found 100 matches (more matches available) for provider/session-related terms; relevant hits included /home/byk/Code/opencode/packages/app/src/utils/server-compat.ts:164 calling legacy(value?.location ?? undefined).session.create(...), /home/byk/Code/opencode/packages/app/src/context/global-sync/bootstrap.ts:233 calling legacy.provider.list(), /home/byk/Code/opencode/packages/app/src/context/global-sync/bootstrap.ts:238 calling sdk.provider.list(location), and /home/byk/Code/opencode/packages/app/src/components/prompt-input/submit.ts:404 calling .api.session.create(...).createStore over multiple createSignal calls.ALWAYS USE PARALLEL TOOLS WHEN APPLICABLE./home/byk/Code/opencode/packages/app/src/context/global-sync/bootstrap.ts:330-359 defines bootstrapDirectory(input) with directory, scope, mcp, sdk, a combined API containing agent, command, mcp, permission, project, question, reference, session, and vcs, plus store, setStore, vcsCache, loadSessions, translate, global config/path/project/provider, queryClient, optional session, optional protocol, and optional connected.bootstrapDirectory() seeds project/path/config and sets partial loading state at /home/byk/Code/opencode/packages/app/src/context/global-sync/bootstrap.ts:365-373; provider revisions are scoped using ScopedKey.from(input.scope, input.directory) at lines 375-377./home/byk/Code/opencode/packages/app/src/context/global-sync/bootstrap.ts:379-542 builds a parallel slow bootstrap task list containing: session loading; agent loading; v1 config loading; v1 session status; current project lookup; path lookup; v1 VCS loading; optional commands; references; permissions and session warming; questions and session warming; optional MCP state; optional MCP resources; and provider loading.loadSessions(input.directory) at /home/byk/Code/opencode/packages/app/src/context/global-sync/bootstrap.ts:380, loadAgentsQuery(input.scope, input.directory, ...) at lines 381-384, input.api.project.current({ location: { directory: input.directory } }) at lines 417-421, loadPathQuery(input.scope, input.directory, ...) at lines 422-429, loadCommands(input.directory, ...) at lines 439-443, loadReferencesQuery(input.scope, input.directory, ...) at lines 444-447, permission request location at lines 451-454, question request location at lines 487-490, MCP query directory at lines 520-529, and provider query directory at lines 530-533./home/byk/Code/opencode/packages/app/src/context/global-sync/bootstrap.ts:412-414 resolves all session IDs from status concurrently with Promise.all; permission and question warming similarly use Promise.all at lines 460-462 and 496-498./home/byk/Code/opencode/packages/app/src/context/global-sync/bootstrap.ts:530-541 catches the error, suppresses the toast if connected() is false, derives the project via getFilename(input.directory), and shows an error toast using i18n key toast.project.reloadFailed.title and formatServerError(err, input.translate)./home/byk/Code/opencode/packages/app/src/context/global-sync/bootstrap.ts:544-545; if errors exist, line 547 emits exact log prefix "Failed to finish bootstrap instance" with slowErrs[0], and lines 548-554 conditionally show the same project reload-failed toast using formatServerError(slowErrs[0], input.translate)./home/byk/Code/opencode/packages/app/src/context/global-sync/bootstrap.ts:557 marks status "complete" only when loading and slowErrs.length === 0; bootstrapDirectory() is fire-and-forget through an async IIFE at lines 378-558./home/byk/Code/opencode/packages/app/src/components/prompt-input/submit.ts:333-347 aborts a working request if the prompt has no trimmed text, images, or comments; submission without a current model or agent shows prompt.toast.modelAgentRequired.title and prompt.toast.modelAgentRequired.description.projectDirectory = sdk().directory, isNewSession = !params.id, and default worktree selection "main" at /home/byk/Code/opencode/packages/app/src/components/prompt-input/submit.ts:353-360.client.worktree.create({ directory: projectDirectory }) at /home/byk/Code/opencode/packages/app/src/components/prompt-input/submit.ts:362-366; failures show prompt.toast.worktreeCreateFailed.title with errorMessage(err) at lines 367-373, while a response lacking createdWorktree.directory shows the same title with common.requestFailed at lines 375-380./home/byk/Code/opencode/packages/app/src/components/prompt-input/submit.ts:386-388 assigns that selection to sessionDirectory; when it differs from the project directory, lines 390-396 create a directory-scoped client with { directory: sessionDirectory, throwOnError: true } and call serverSync().child(sessionDirectory).sdk().api.session.create({ agent: currentAgent.name, model: { id: currentModel.id, providerID: currentModel.provider.id, variant }, location: { directory: sessionDirectory } }) at /home/byk/Code/opencode/packages/app/src/components/prompt-input/submit.ts:401-409./home/byk/Code/opencode/packages/app/src/components/prompt-input/submit.ts:410-416 and shown with i18n key prompt.toast.sessionCreateFailed.title plus errorMessage(err); failure to obtain any session later shows prompt.toast.promptSendFailed.title and prompt.toast.promptSendFailed.description at lines 436-441./${base64Encode(sessionDirectory)}/session/${session.id}, and retargets submission at /home/byk/Code/opencode/packages/app/src/components/prompt-input/submit.ts:417-433./home/byk/Code/opencode/packages/client/src/index.ts, generated files generated/types.ts, generated/index.ts, generated/client.ts, generated/client-error.ts, generated Effect equivalents, effect.ts, and contract.ts; a subsequent search returned No files found.CatalogApi was referenced in /home/byk/Code/opencode/packages/app/src/context/global-sync/bootstrap.ts at lines 15, 145, 224, and 335, and in /home/byk/Code/opencode/packages/app/src/context/global-sync/bootstrap.test.ts at lines 5, 231, and 258./home/byk/Code/opencode/packages/client/package.json:3 names the package @opencode-ai/client; exports are "." → "./src/index.ts" and "./effect" → "./src/effect.ts" at lines 7-10./home/byk/Code/opencode/packages/client/package.json:11-15 scripts are generate: bun run script/build.ts, check:generated: bun run generate && git diff --exit-code -- src/generated src/generated-effect, test: bun test --timeout 5000, and typecheck: tsgo --noEmit./home/byk/Code/opencode/packages/client/src/index.ts:1-2 exports everything from ./generated/index and aliases EventsSubscribeOutput as OpenCodeEvent./home/byk/Code/opencode/packages/app/package.json:2-3 identifies @opencode-ai/app version 1.18.16./home/byk/Code/opencode/packages/app/package.json:57 depends on @opencode-ai/client via the vendored archive file:vendor/opencode-ai-client-1.17.13-v2.tgz, while workspace packages include @opencode-ai/core, @opencode-ai/schema, @opencode-ai/sdk, @opencode-ai/session-ui, and @opencode-ai/ui at lines 58-62./home/byk/Code/opencode/packages/app/vendor contains exactly opencode-ai-client-1.17.13-v2.tgz; two adjacent searches returned No files found./home/byk/Code/opencode/node_modules/@opencode-ai contained only plugin/, script/, and sdk/, whereas /home/byk/Code/opencode/packages/app/node_modules/@opencode-ai contained client/, core/, schema/, sdk/, session-ui/, and ui/./home/byk/Code/opencode/packages/app/node_modules/@opencode-ai/client contained dist/, package.json, and README.md./home/byk/Code/opencode/packages/server/src/api.ts:3 importing SessionLocationMiddleware from ./middleware/session-location and line 7 exposing sessionLocationMiddleware: SessionLocationMiddleware./home/byk/Code/opencode/packages/server/src contained 9 entries: api.ts, auth.ts, cors.ts, handlers.ts, handlers/, location.ts, middleware/, pty-environment.ts, and routes.ts.