mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-07 08:26:51 +00:00
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.
This commit is contained in:
parent
60f9221d69
commit
bf648856ba
4 changed files with 4 additions and 0 deletions
|
|
@ -397,6 +397,7 @@ export class Cline extends EventEmitter<ClineEvents> {
|
|||
cacheReads: apiMetrics.totalCacheReads,
|
||||
totalCost: apiMetrics.totalCost,
|
||||
size: taskDirSize,
|
||||
workspace: this.cwd,
|
||||
})
|
||||
} catch (error) {
|
||||
console.error("Failed to save cline messages:", error)
|
||||
|
|
|
|||
1
src/exports/roo-code.d.ts
vendored
1
src/exports/roo-code.d.ts
vendored
|
|
@ -228,6 +228,7 @@ type GlobalSettings = {
|
|||
cacheReads?: number | undefined
|
||||
totalCost: number
|
||||
size?: number | undefined
|
||||
workspace?: string | undefined
|
||||
}[]
|
||||
| undefined
|
||||
autoApprovalEnabled?: boolean | undefined
|
||||
|
|
|
|||
|
|
@ -231,6 +231,7 @@ type GlobalSettings = {
|
|||
cacheReads?: number | undefined
|
||||
totalCost: number
|
||||
size?: number | undefined
|
||||
workspace?: string | undefined
|
||||
}[]
|
||||
| undefined
|
||||
autoApprovalEnabled?: boolean | undefined
|
||||
|
|
|
|||
|
|
@ -146,6 +146,7 @@ export const historyItemSchema = z.object({
|
|||
cacheReads: z.number().optional(),
|
||||
totalCost: z.number(),
|
||||
size: z.number().optional(),
|
||||
workspace: z.string().optional(),
|
||||
})
|
||||
|
||||
export type HistoryItem = z.infer<typeof historyItemSchema>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue