diff options
| author | opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> | 2026-04-17 00:50:44 +0000 |
|---|---|---|
| committer | opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> | 2026-04-17 00:50:44 +0000 |
| commit | 266fb9342238a62cf9d66437c81c91ee40e8632c (patch) | |
| tree | f668d052d728fce47cc5df084670f6807ec7029d | |
| parent | 51d8219c46f902b90cee716f3b8475e163e21e7c (diff) | |
| download | opencode-266fb9342238a62cf9d66437c81c91ee40e8632c.tar.gz opencode-266fb9342238a62cf9d66437c81c91ee40e8632c.zip | |
chore: generate
| -rw-r--r-- | packages/opencode/src/session/message-v2.ts | 11 | ||||
| -rw-r--r-- | packages/opencode/src/session/prompt.ts | 12 | ||||
| -rw-r--r-- | packages/opencode/src/session/summary.ts | 4 | ||||
| -rw-r--r-- | packages/opencode/src/session/todo.ts | 7 |
4 files changed, 7 insertions, 27 deletions
diff --git a/packages/opencode/src/session/message-v2.ts b/packages/opencode/src/session/message-v2.ts index 5e7e00840..46686947e 100644 --- a/packages/opencode/src/session/message-v2.ts +++ b/packages/opencode/src/session/message-v2.ts @@ -544,10 +544,7 @@ const part = (row: typeof PartTable.$inferSelect) => }) as Part const older = (row: Cursor) => - or( - lt(MessageTable.time_created, row.time), - and(eq(MessageTable.time_created, row.time), lt(MessageTable.id, row.id)), - ) + or(lt(MessageTable.time_created, row.time), and(eq(MessageTable.time_created, row.time), lt(MessageTable.id, row.id))) function hydrate(rows: (typeof MessageTable.$inferSelect)[]) { const ids = rows.map((row) => row.id) @@ -930,11 +927,7 @@ export function filterCompacted(msgs: Iterable<WithParts>) { const completed = new Set<string>() for (const msg of msgs) { result.push(msg) - if ( - msg.info.role === "user" && - completed.has(msg.info.id) && - msg.parts.some((part) => part.type === "compaction") - ) + if (msg.info.role === "user" && completed.has(msg.info.id) && msg.parts.some((part) => part.type === "compaction")) break if (msg.info.role === "assistant" && msg.info.summary && msg.info.finish && !msg.info.error) completed.add(msg.info.parentID) diff --git a/packages/opencode/src/session/prompt.ts b/packages/opencode/src/session/prompt.ts index 14fdf3078..9faa61878 100644 --- a/packages/opencode/src/session/prompt.ts +++ b/packages/opencode/src/session/prompt.ts @@ -1073,9 +1073,7 @@ NOTE: At any point in time through this workflow you should feel free to ask the let start = parseInt(range.start) let end = range.end ? parseInt(range.end) : undefined if (start === end) { - const symbols = yield* lsp - .documentSymbol(filePathURI) - .pipe(Effect.catch(() => Effect.succeed([]))) + const symbols = yield* lsp.documentSymbol(filePathURI).pipe(Effect.catch(() => Effect.succeed([]))) for (const symbol of symbols) { let r: LSP.Range | undefined if ("range" in symbol) r = symbol.range @@ -1453,9 +1451,7 @@ NOTE: At any point in time through this workflow you should feel free to ask the } if (step === 1) - yield* summary - .summarize({ sessionID, messageID: lastUser.id }) - .pipe(Effect.ignore, Effect.forkIn(scope)) + yield* summary.summarize({ sessionID, messageID: lastUser.id }).pipe(Effect.ignore, Effect.forkIn(scope)) if (step > 1 && lastFinished) { for (const m of msgs) { @@ -1723,9 +1719,7 @@ export const PromptInput = z.object({ tools: z .record(z.string(), z.boolean()) .optional() - .describe( - "@deprecated tools and permissions have been merged, you can set permissions on the session itself now", - ), + .describe("@deprecated tools and permissions have been merged, you can set permissions on the session itself now"), format: MessageV2.Format.optional(), system: z.string().optional(), variant: z.string().optional(), diff --git a/packages/opencode/src/session/summary.ts b/packages/opencode/src/session/summary.ts index 2be08f3f4..70b3102f6 100644 --- a/packages/opencode/src/session/summary.ts +++ b/packages/opencode/src/session/summary.ts @@ -79,9 +79,7 @@ export const layer = Layer.effect( const storage = yield* Storage.Service const bus = yield* Bus.Service - const computeDiff = Effect.fn("SessionSummary.computeDiff")(function* (input: { - messages: MessageV2.WithParts[] - }) { + const computeDiff = Effect.fn("SessionSummary.computeDiff")(function* (input: { messages: MessageV2.WithParts[] }) { let from: string | undefined let to: string | undefined for (const item of input.messages) { diff --git a/packages/opencode/src/session/todo.ts b/packages/opencode/src/session/todo.ts index 5523fdc86..4840f86a3 100644 --- a/packages/opencode/src/session/todo.ts +++ b/packages/opencode/src/session/todo.ts @@ -61,12 +61,7 @@ export const layer = Layer.effect( const get = Effect.fn("Todo.get")(function* (sessionID: SessionID) { const rows = yield* Effect.sync(() => Database.use((db) => - db - .select() - .from(TodoTable) - .where(eq(TodoTable.session_id, sessionID)) - .orderBy(asc(TodoTable.position)) - .all(), + db.select().from(TodoTable).where(eq(TodoTable.session_id, sessionID)).orderBy(asc(TodoTable.position)).all(), ), ) return rows.map((row) => ({ |
