File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
packages/opencode/src/session Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,11 @@ import { generateText, type ModelMessage } from "ai"
66import { MessageV2 } from "./message-v2"
77import { Identifier } from "@/id/id"
88import { Snapshot } from "@/snapshot"
9-
109import { ProviderTransform } from "@/provider/transform"
1110import { SystemPrompt } from "./system"
1211import { Log } from "@/util/log"
12+ import path from "path"
13+ import { Instance } from "@/project/instance"
1314
1415export namespace SessionSummary {
1516 const log = Log . create ( { service : "session.summary" } )
@@ -33,10 +34,13 @@ export namespace SessionSummary {
3334 input . messages
3435 . flatMap ( ( x ) => x . parts )
3536 . filter ( ( x ) => x . type === "patch" )
36- . flatMap ( ( x ) => x . files ) ,
37+ . flatMap ( ( x ) => x . files )
38+ . map ( ( x ) => path . relative ( Instance . worktree , x ) ) ,
3739 )
3840 const diffs = await computeDiff ( { messages : input . messages } ) . then ( ( x ) =>
39- x . filter ( ( x ) => files . has ( x . file ) ) ,
41+ x . filter ( ( x ) => {
42+ return files . has ( x . file )
43+ } ) ,
4044 )
4145 await Session . update ( input . sessionID , ( draft ) => {
4246 draft . summary = {
You can’t perform that action at this time.
0 commit comments