mirror of
https://github.com/aljazceru/opencode.git
synced 2026-01-27 19:54:56 +01:00
core: improve dependency management and error handling for more reliable builds
This commit is contained in:
@@ -526,11 +526,11 @@ export namespace Provider {
|
||||
model_id: string
|
||||
}[]
|
||||
}
|
||||
const models = state?.recently_used_models ?? []
|
||||
if (models.length > 0) {
|
||||
const [model] = state?.recently_used_models ?? []
|
||||
if (model) {
|
||||
return {
|
||||
providerID: models[0].provider_id,
|
||||
modelID: models[0].model_id,
|
||||
providerID: model.provider_id,
|
||||
modelID: model.model_id,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -2,7 +2,7 @@ import { AsyncLocalStorage } from "async_hooks"
|
||||
|
||||
export namespace Context {
|
||||
export class NotFound extends Error {
|
||||
constructor(public readonly name: string) {
|
||||
constructor(public override readonly name: string) {
|
||||
super(`No context found for ${name}`)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ export abstract class NamedError extends Error {
|
||||
const result = class extends NamedError {
|
||||
public static readonly Schema = schema
|
||||
|
||||
public readonly name = name as Name
|
||||
public override readonly name = name as Name
|
||||
|
||||
constructor(
|
||||
public readonly data: z.input<Data>,
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
"jsxImportSource": "@opentui/solid",
|
||||
"lib": ["ESNext", "DOM", "DOM.Iterable"],
|
||||
"types": [],
|
||||
"noUncheckedIndexedAccess": false,
|
||||
"customConditions": ["browser"],
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
|
||||
Reference in New Issue
Block a user