refactor(core): optimize location startup
This commit is contained in:
@@ -38,9 +38,9 @@ export const Info = Schema.Struct({
|
||||
})
|
||||
.annotate({ identifier: "Agent.Info" })
|
||||
.pipe(
|
||||
statics((schema) => ({
|
||||
statics(() => ({
|
||||
empty: (id: ID) =>
|
||||
schema.make({
|
||||
({
|
||||
id,
|
||||
name: Name.make(id),
|
||||
request: { settings: {}, headers: {}, body: {} },
|
||||
@@ -50,7 +50,7 @@ export const Info = Schema.Struct({
|
||||
{ action: "*", resource: "*", effect: "allow" },
|
||||
{ action: "external_directory", resource: "*", effect: "ask" },
|
||||
],
|
||||
}),
|
||||
}) satisfies Info,
|
||||
})),
|
||||
)
|
||||
|
||||
|
||||
@@ -93,9 +93,9 @@ export const Info = Schema.Struct({
|
||||
})
|
||||
.annotate({ identifier: "Model.Info" })
|
||||
.pipe(
|
||||
statics((schema) => ({
|
||||
statics(() => ({
|
||||
empty: (providerID: Provider.ID, id: ID) =>
|
||||
schema.make({
|
||||
({
|
||||
id,
|
||||
modelID: id,
|
||||
providerID,
|
||||
@@ -107,6 +107,6 @@ export const Info = Schema.Struct({
|
||||
status: "active",
|
||||
enabled: true,
|
||||
limit: { context: 0, output: 0 },
|
||||
}),
|
||||
}) satisfies Info,
|
||||
})),
|
||||
)
|
||||
|
||||
@@ -52,7 +52,7 @@ export const Info = Schema.Struct({
|
||||
})
|
||||
.annotate({ identifier: "ProviderV2.Info" })
|
||||
.pipe(
|
||||
statics((schema) => ({
|
||||
empty: (id: ID) => schema.make({ id, name: id, package: "" }),
|
||||
statics(() => ({
|
||||
empty: (id: ID): Info => ({ id, name: id, package: "" }),
|
||||
})),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user