core: improve dependency management and error handling for more reliable builds

This commit is contained in:
Dax Raad
2025-10-14 01:33:25 -04:00
parent 19b3f3d7ce
commit b8249cde4b
6 changed files with 15 additions and 14 deletions

View File

@@ -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,
}
}
})

View File

@@ -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}`)
}
}

View File

@@ -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>,

View File

@@ -6,6 +6,7 @@
"jsxImportSource": "@opentui/solid",
"lib": ["ESNext", "DOM", "DOM.Iterable"],
"types": [],
"noUncheckedIndexedAccess": false,
"customConditions": ["browser"],
"baseUrl": ".",
"paths": {