summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-06-24 11:16:17 -0400
committerDax Raad <[email protected]>2025-06-24 11:16:17 -0400
commit3664b09812352795fc9855b9a921fdd2ca293a14 (patch)
tree84420eaeb64ec3495509ea6bcea21b7a2b227173
parent7050cc0ac384c32c61c72cc0356065c7cdb09d4a (diff)
downloadopencode-3664b09812352795fc9855b9a921fdd2ca293a14.tar.gz
opencode-3664b09812352795fc9855b9a921fdd2ca293a14.zip
remove debug code writing to /tmp/message.json
-rw-r--r--packages/opencode/src/session/index.ts24
1 files changed, 3 insertions, 21 deletions
diff --git a/packages/opencode/src/session/index.ts b/packages/opencode/src/session/index.ts
index 1bb606e3e..b289f328f 100644
--- a/packages/opencode/src/session/index.ts
+++ b/packages/opencode/src/session/index.ts
@@ -248,7 +248,7 @@ export namespace Session {
if (
model.info.limit.context &&
tokens >
- (model.info.limit.context - (model.info.limit.output ?? 0)) * 0.9
+ (model.info.limit.context - (model.info.limit.output ?? 0)) * 0.9
) {
await summarize({
sessionID: input.sessionID,
@@ -295,7 +295,7 @@ export namespace Session {
draft.title = result.text
})
})
- .catch(() => { })
+ .catch(() => {})
}
const msg: Message.Info = {
role: "user",
@@ -433,24 +433,6 @@ export namespace Session {
}
let text: Message.TextPart | undefined
- await Bun.write(
- "/tmp/message.json",
- JSON.stringify(
- [
- ...system.map(
- (x): CoreMessage => ({
- role: "system",
- content: x,
- }),
- ),
- ...convertToCoreMessages(
- msgs.map(toUIMessage).filter((x) => x.parts.length > 0),
- ),
- ],
- null,
- 2,
- ),
- )
const result = streamText({
onStepFinish: async (step) => {
log.info("step finish", { finishReason: step.finishReason })
@@ -572,7 +554,7 @@ export namespace Session {
case "tool-call": {
const [match] = next.parts.flatMap((p) =>
p.type === "tool-invocation" &&
- p.toolInvocation.toolCallId === value.toolCallId
+ p.toolInvocation.toolCallId === value.toolCallId
? [p]
: [],
)