Skip to content

Commit 4445ffe

Browse files
committed
feat: add workspace tracking to history items
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 7409c48 commit 4445ffe

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
@@ -392,6 +392,7 @@ export class Cline extends EventEmitter<ClineEvents> {
392392
cacheReads: apiMetrics.totalCacheReads,
393393
totalCost: apiMetrics.totalCost,
394394
size: taskDirSize,
395+
workspace: this.cwd,
395396
})
396397
} catch (error) {
397398
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
@@ -213,6 +213,7 @@ type GlobalSettings = {
213213
cacheReads?: number | undefined
214214
totalCost: number
215215
size?: number | undefined
216+
workspace?: string | undefined
216217
}[]
217218
| undefined
218219
autoApprovalEnabled?: boolean | undefined

src/exports/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ type GlobalSettings = {
216216
cacheReads?: number | undefined
217217
totalCost: number
218218
size?: number | undefined
219+
workspace?: string | undefined
219220
}[]
220221
| undefined
221222
autoApprovalEnabled?: boolean | undefined

src/schemas/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ export const historyItemSchema = z.object({
143143
cacheReads: z.number().optional(),
144144
totalCost: z.number(),
145145
size: z.number().optional(),
146+
workspace: z.string().optional(),
146147
})
147148

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

0 commit comments

Comments
 (0)