feat(core): add command registry (#30624)

This commit is contained in:
Dax
2026-06-04 02:57:43 -04:00
committed by GitHub
parent 70bb710715
commit 1ff19103a2
150 changed files with 4753 additions and 2657 deletions
+4 -4
View File
@@ -241,7 +241,7 @@ export const layer = Layer.effect(
session: Session.Info
history: SessionV1.WithParts[]
providerID: ProviderV2.ID
modelID: ProviderV2.ModelID
modelID: ModelV2.ID
}) {
if (input.session.parentID) return
if (!Session.isDefaultTitle(input.session.title)) return
@@ -653,7 +653,7 @@ export const layer = Layer.effect(
const getModel = Effect.fn("SessionPrompt.getModel")(function* (
providerID: ProviderV2.ID,
modelID: ProviderV2.ModelID,
modelID: ModelV2.ID,
sessionID: SessionID,
) {
const exit = yield* provider.getModel(providerID, modelID).pipe(Effect.exit)
@@ -681,7 +681,7 @@ export const layer = Layer.effect(
if (current?.model) {
return {
providerID: ProviderV2.ID.make(current.model.providerID),
modelID: ProviderV2.ModelID.make(current.model.id),
modelID: ModelV2.ID.make(current.model.id),
...(current.model.variant && current.model.variant !== "default" ? { variant: current.model.variant } : {}),
}
}
@@ -1679,7 +1679,7 @@ export const defaultLayer = Layer.suspend(() =>
)
const ModelRef = Schema.Struct({
providerID: ProviderV2.ID,
modelID: ProviderV2.ModelID,
modelID: ModelV2.ID,
})
export const PromptInput = Schema.Struct({