chore: generate

This commit is contained in:
opencode-agent[bot]
2026-06-03 02:43:28 +00:00
parent 83452558f7
commit 6003217eaa
17 changed files with 216 additions and 91 deletions

View File

@@ -39,7 +39,10 @@ export function pluginOptions(plugin: ConfigPluginV1.Spec): ConfigPluginV1.Optio
// Path-like specs are resolved relative to the config file that declared them so merges later on do not
// accidentally reinterpret `./plugin.ts` relative to some other directory.
export async function resolvePluginSpec(plugin: ConfigPluginV1.Spec, configFilepath: string): Promise<ConfigPluginV1.Spec> {
export async function resolvePluginSpec(
plugin: ConfigPluginV1.Spec,
configFilepath: string,
): Promise<ConfigPluginV1.Spec> {
const spec = pluginSpecifier(plugin)
if (!isPathPluginSpec(spec)) return plugin

View File

@@ -38,11 +38,7 @@ interface State {
approved: PermissionV1.Rule[]
}
export function evaluate(
permission: string,
pattern: string,
...rulesets: PermissionV1.Ruleset[]
): PermissionV1.Rule {
export function evaluate(permission: string, pattern: string, ...rulesets: PermissionV1.Ruleset[]): PermissionV1.Rule {
return (
rulesets
.flat()

View File

@@ -354,9 +354,7 @@ export const layer = Layer.effect(
throw new Error(`Compaction parent must be a user message: ${input.parentID}`)
}
const userMessage = parent.info
const compactionPart = parent.parts.find(
(part): part is SessionV1.CompactionPart => part.type === "compaction",
)
const compactionPart = parent.parts.find((part): part is SessionV1.CompactionPart => part.type === "compaction")
let messages = input.messages
let replay:

View File

@@ -1500,11 +1500,11 @@ export const layer = Layer.effect(
},
)
const loop: (input: LoopInput) => Effect.Effect<SessionV1.WithParts> = Effect.fn("SessionPrompt.loop")(
function* (input: LoopInput) {
return yield* state.ensureRunning(input.sessionID, lastAssistant(input.sessionID), runLoop(input.sessionID))
},
)
const loop: (input: LoopInput) => Effect.Effect<SessionV1.WithParts> = Effect.fn("SessionPrompt.loop")(function* (
input: LoopInput,
) {
return yield* state.ensureRunning(input.sessionID, lastAssistant(input.sessionID), runLoop(input.sessionID))
})
const shell: (input: ShellInput) => Effect.Effect<SessionV1.WithParts, Session.BusyError> = Effect.fn(
"SessionPrompt.shell",

View File

@@ -493,10 +493,7 @@ export interface Interface {
readonly setShare: (input: { sessionID: SessionID; share: Info["share"] }) => Effect.Effect<void>
readonly setWorkspace: (input: { sessionID: SessionID; workspaceID: Info["workspaceID"] }) => Effect.Effect<void>
readonly diff: (sessionID: SessionID) => Effect.Effect<Snapshot.FileDiff[]>
readonly messages: (input: {
sessionID: SessionID
limit?: number
}) => Effect.Effect<SessionV1.WithParts[], NotFound>
readonly messages: (input: { sessionID: SessionID; limit?: number }) => Effect.Effect<SessionV1.WithParts[], NotFound>
readonly children: (parentID: SessionID) => Effect.Effect<Info[]>
readonly remove: (sessionID: SessionID) => Effect.Effect<void, NotFound>
readonly updateMessage: <T extends SessionV1.Info>(msg: T) => Effect.Effect<T>

View File

@@ -78,9 +78,7 @@ export const layer = Layer.effect(
const events = yield* EventV2Bridge.Service
const config = yield* Config.Service
const computeDiff = Effect.fn("SessionSummary.computeDiff")(function* (input: {
messages: SessionV1.WithParts[]
}) {
const computeDiff = Effect.fn("SessionSummary.computeDiff")(function* (input: { messages: SessionV1.WithParts[] }) {
let from: string | undefined
let to: string | undefined
for (const item of input.messages) {

View File

@@ -109,9 +109,7 @@ const add = Effect.fnUntraced(function* (state: State, match: string, events: Ev
}).pipe(
Effect.catch(
Effect.fnUntraced(function* (err) {
const message = FrontmatterError.isInstance(err)
? err.data.message
: `Failed to parse skill ${match}`
const message = FrontmatterError.isInstance(err) ? err.data.message : `Failed to parse skill ${match}`
const { Session } = yield* Effect.promise(() => import("@/session/session"))
yield* events.publish(Session.Event.Error, { error: new NamedError.Unknown({ message }).toObject() })
log.error("failed to load skill", { skill: match, err })

View File

@@ -26,11 +26,7 @@ function createReasoningPart(text: string): SessionV1.Part {
}
}
function createToolPart(
tool: string,
title: string,
status: "completed" | "running" = "completed",
): SessionV1.Part {
function createToolPart(tool: string, title: string, status: "completed" | "running" = "completed"): SessionV1.Part {
if (status === "completed") {
return {
id: PartID.ascending(),

View File

@@ -330,9 +330,7 @@ it.live("session.processor effect tests preserve text start time", () =>
gate.resolve()
const exit = yield* Fiber.await(run)
const text = (yield* MessageV2.parts(msg.id)).find(
(part): part is SessionV1.TextPart => part.type === "text",
)
const text = (yield* MessageV2.parts(msg.id)).find((part): part is SessionV1.TextPart => part.type === "text")
expect(Exit.isSuccess(exit)).toBe(true)
expect(text?.text).toBe("hello")