File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
packages/opencode/src/session Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import z from "zod"
44import { Session } from "."
55import { generateText } from "ai"
66import { MessageV2 } from "./message-v2"
7- import SUMMARIZE_TURN from "./prompt/summarize-turn.txt"
87import { Flag } from "@/flag/flag"
98
109export namespace MessageSummary {
@@ -26,12 +25,17 @@ export namespace MessageSummary {
2625
2726 const result = await generateText ( {
2827 model : small . language ,
28+ maxOutputTokens : 100 ,
2929 messages : [
3030 {
31- role : "system" ,
32- content : SUMMARIZE_TURN ,
31+ role : "user" ,
32+ content : `
33+ Summarize the following conversation into 2 sentences MAX explaining what happened and why
34+ <conversation>
35+ ${ JSON . stringify ( MessageV2 . toModelMessage ( messages ) ) }
36+ </conversation>
37+ ` ,
3338 } ,
34- ...MessageV2 . toModelMessage ( messages ) ,
3539 ] ,
3640 } )
3741
You can’t perform that action at this time.
0 commit comments