Skip to content

Commit bf64885

Browse files
authored
feat: add workspace tracking to history items (#2054)
Track the current workspace path in history items to enable filtering and organization of history by workspace. This change adds the workspace property to the history schema and ensures it's saved with each history entry.
1 parent 60f9221 commit bf64885

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

src/core/Cline.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,7 @@ export class Cline extends EventEmitter<ClineEvents> {
397397
cacheReads: apiMetrics.totalCacheReads,
398398
totalCost: apiMetrics.totalCost,
399399
size: taskDirSize,
400+
workspace: this.cwd,
400401
})
401402
} catch (error) {
402403
console.error("Failed to save cline messages:", error)

src/exports/roo-code.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ type GlobalSettings = {
228228
cacheReads?: number | undefined
229229
totalCost: number
230230
size?: number | undefined
231+
workspace?: string | undefined
231232
}[]
232233
| undefined
233234
autoApprovalEnabled?: boolean | undefined

src/exports/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ type GlobalSettings = {
231231
cacheReads?: number | undefined
232232
totalCost: number
233233
size?: number | undefined
234+
workspace?: string | undefined
234235
}[]
235236
| undefined
236237
autoApprovalEnabled?: boolean | undefined

src/schemas/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ export const historyItemSchema = z.object({
146146
cacheReads: z.number().optional(),
147147
totalCost: z.number(),
148148
size: z.number().optional(),
149+
workspace: z.string().optional(),
149150
})
150151

151152
export type HistoryItem = z.infer<typeof historyItemSchema>

0 commit comments

Comments
 (0)