mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-12 02:37:45 +08:00
feat(storage): implement storage manager for centralized management and cleanup
- Added a new Storage Manager component to handle storage statistics, project cleanup, and configuration for CCW centralized storage. - Introduced functions to calculate directory sizes, get project storage stats, and clean specific or all storage. - Enhanced SQLiteStore with a public API for executing queries securely. - Updated tests to utilize the new execute_query method and validate storage management functionalities. - Improved performance by implementing connection pooling with idle timeout management in SQLiteStore. - Added new fields (token_count, symbol_type) to the symbols table and adjusted related insertions. - Enhanced error handling and logging for storage operations.
This commit is contained in:
@@ -80,9 +80,21 @@ const bugSlug = bug_description.toLowerCase().replace(/[^a-z0-9]+/g, '-').substr
|
||||
const dateStr = getUtc8ISOString().substring(0, 10) // Format: 2025-11-29
|
||||
|
||||
const sessionId = `${bugSlug}-${dateStr}` // e.g., "user-avatar-upload-fails-2025-11-29"
|
||||
const sessionFolder = `.workflow/.lite-fix/${sessionId}`
|
||||
|
||||
bash(`mkdir -p ${sessionFolder} && test -d ${sessionFolder} && echo "SUCCESS: ${sessionFolder}" || echo "FAILED: ${sessionFolder}"`)
|
||||
// Initialize session via session_manager tool
|
||||
const initResult = await ccw_tool_exec('session_manager', {
|
||||
operation: 'init',
|
||||
session_id: sessionId,
|
||||
location: 'lite-fix',
|
||||
metadata: {
|
||||
description: bug_description,
|
||||
severity: severity, // Set after severity assessment
|
||||
created_at: getUtc8ISOString()
|
||||
}
|
||||
})
|
||||
|
||||
const sessionFolder = initResult.result.path
|
||||
console.log(`Session initialized: ${sessionId} at ${sessionFolder}`)
|
||||
```
|
||||
|
||||
**Diagnosis Decision Logic**:
|
||||
|
||||
@@ -80,9 +80,21 @@ const taskSlug = task_description.toLowerCase().replace(/[^a-z0-9]+/g, '-').subs
|
||||
const dateStr = getUtc8ISOString().substring(0, 10) // Format: 2025-11-29
|
||||
|
||||
const sessionId = `${taskSlug}-${dateStr}` // e.g., "implement-jwt-refresh-2025-11-29"
|
||||
const sessionFolder = `.workflow/.lite-plan/${sessionId}`
|
||||
|
||||
bash(`mkdir -p ${sessionFolder} && test -d ${sessionFolder} && echo "SUCCESS: ${sessionFolder}" || echo "FAILED: ${sessionFolder}"`)
|
||||
// Initialize session via session_manager tool
|
||||
const initResult = await ccw_tool_exec('session_manager', {
|
||||
operation: 'init',
|
||||
session_id: sessionId,
|
||||
location: 'lite-plan',
|
||||
metadata: {
|
||||
description: task_description,
|
||||
complexity: complexity, // Set after complexity assessment
|
||||
created_at: getUtc8ISOString()
|
||||
}
|
||||
})
|
||||
|
||||
const sessionFolder = initResult.result.path
|
||||
console.log(`Session initialized: ${sessionId} at ${sessionFolder}`)
|
||||
```
|
||||
|
||||
**Exploration Decision Logic**:
|
||||
|
||||
Reference in New Issue
Block a user