Skip to content

Commit f62c98f

Browse files
chore: generate
1 parent c6d4df1 commit f62c98f

4 files changed

Lines changed: 7 additions & 27 deletions

File tree

packages/opencode/src/session/message-v2.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -544,10 +544,7 @@ const part = (row: typeof PartTable.$inferSelect) =>
544544
}) as Part
545545

546546
const older = (row: Cursor) =>
547-
or(
548-
lt(MessageTable.time_created, row.time),
549-
and(eq(MessageTable.time_created, row.time), lt(MessageTable.id, row.id)),
550-
)
547+
or(lt(MessageTable.time_created, row.time), and(eq(MessageTable.time_created, row.time), lt(MessageTable.id, row.id)))
551548

552549
function hydrate(rows: (typeof MessageTable.$inferSelect)[]) {
553550
const ids = rows.map((row) => row.id)
@@ -930,11 +927,7 @@ export function filterCompacted(msgs: Iterable<WithParts>) {
930927
const completed = new Set<string>()
931928
for (const msg of msgs) {
932929
result.push(msg)
933-
if (
934-
msg.info.role === "user" &&
935-
completed.has(msg.info.id) &&
936-
msg.parts.some((part) => part.type === "compaction")
937-
)
930+
if (msg.info.role === "user" && completed.has(msg.info.id) && msg.parts.some((part) => part.type === "compaction"))
938931
break
939932
if (msg.info.role === "assistant" && msg.info.summary && msg.info.finish && !msg.info.error)
940933
completed.add(msg.info.parentID)

packages/opencode/src/session/prompt.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,9 +1073,7 @@ NOTE: At any point in time through this workflow you should feel free to ask the
10731073
let start = parseInt(range.start)
10741074
let end = range.end ? parseInt(range.end) : undefined
10751075
if (start === end) {
1076-
const symbols = yield* lsp
1077-
.documentSymbol(filePathURI)
1078-
.pipe(Effect.catch(() => Effect.succeed([])))
1076+
const symbols = yield* lsp.documentSymbol(filePathURI).pipe(Effect.catch(() => Effect.succeed([])))
10791077
for (const symbol of symbols) {
10801078
let r: LSP.Range | undefined
10811079
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
14531451
}
14541452

14551453
if (step === 1)
1456-
yield* summary
1457-
.summarize({ sessionID, messageID: lastUser.id })
1458-
.pipe(Effect.ignore, Effect.forkIn(scope))
1454+
yield* summary.summarize({ sessionID, messageID: lastUser.id }).pipe(Effect.ignore, Effect.forkIn(scope))
14591455

14601456
if (step > 1 && lastFinished) {
14611457
for (const m of msgs) {
@@ -1723,9 +1719,7 @@ export const PromptInput = z.object({
17231719
tools: z
17241720
.record(z.string(), z.boolean())
17251721
.optional()
1726-
.describe(
1727-
"@deprecated tools and permissions have been merged, you can set permissions on the session itself now",
1728-
),
1722+
.describe("@deprecated tools and permissions have been merged, you can set permissions on the session itself now"),
17291723
format: MessageV2.Format.optional(),
17301724
system: z.string().optional(),
17311725
variant: z.string().optional(),

packages/opencode/src/session/summary.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,7 @@ export const layer = Layer.effect(
7979
const storage = yield* Storage.Service
8080
const bus = yield* Bus.Service
8181

82-
const computeDiff = Effect.fn("SessionSummary.computeDiff")(function* (input: {
83-
messages: MessageV2.WithParts[]
84-
}) {
82+
const computeDiff = Effect.fn("SessionSummary.computeDiff")(function* (input: { messages: MessageV2.WithParts[] }) {
8583
let from: string | undefined
8684
let to: string | undefined
8785
for (const item of input.messages) {

packages/opencode/src/session/todo.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,7 @@ export const layer = Layer.effect(
6161
const get = Effect.fn("Todo.get")(function* (sessionID: SessionID) {
6262
const rows = yield* Effect.sync(() =>
6363
Database.use((db) =>
64-
db
65-
.select()
66-
.from(TodoTable)
67-
.where(eq(TodoTable.session_id, sessionID))
68-
.orderBy(asc(TodoTable.position))
69-
.all(),
64+
db.select().from(TodoTable).where(eq(TodoTable.session_id, sessionID)).orderBy(asc(TodoTable.position)).all(),
7065
),
7166
)
7267
return rows.map((row) => ({

0 commit comments

Comments
 (0)