feat(core): add command registry (#30624)
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user