NewContextBuilder creates a new context builder. workspaceDir is the detected project root (or CWD) where the session started.
(bootstrap *BootstrapLoader, memory *MemoryStore, workspaceDir string)
| 29 | // NewContextBuilder creates a new context builder. |
| 30 | // workspaceDir is the detected project root (or CWD) where the session started. |
| 31 | func NewContextBuilder(bootstrap *BootstrapLoader, memory *MemoryStore, workspaceDir string) *ContextBuilder { |
| 32 | cb := &ContextBuilder{ |
| 33 | bootstrap: bootstrap, |
| 34 | memory: memory, |
| 35 | workspaceDir: workspaceDir, |
| 36 | } |
| 37 | |
| 38 | // Initialize path-specific rules loader |
| 39 | if bootstrap != nil { |
| 40 | globalDir := "" |
| 41 | if bootstrap.globalDir != "" { |
| 42 | globalDir = bootstrap.globalDir |
| 43 | } |
| 44 | cb.rules = NewRulesLoader(workspaceDir, globalDir, bootstrap.logger) |
| 45 | } |
| 46 | |
| 47 | return cb |
| 48 | } |
| 49 | |
| 50 | // WorkspaceDir returns the current workspace directory. |
| 51 | func (cb *ContextBuilder) WorkspaceDir() string { |