Commit Graph

3 Commits

Author SHA1 Message Date
can1357 d1e16d2101 refactor: implemented $PWD > cwd to prevent macOS symlink resolution
- Replaced all direct `process.cwd()` calls with `getProjectDir()` utility function across 40+ files to centralize project directory resolution logic.
- Added `getProjectDir()` and `setProjectDir()` functions to `@oh-my-pi/pi-utils/dirs` module to provide abstracted project directory management.
- Made `SessionManager.list()` method asynchronous to support asynchronous session discovery operations.
- Updated default working directory resolution throughout codebase to use `getProjectDir()` instead of `process.cwd()` for improved project directory detection.
2026-02-13 23:40:02 +01:00
can1357 fcd7ff4f84 refactor(dirs): centralized directory path utilities into @oh-my-pi/pi-utils/dirs module
- Extracted directory path utilities from multiple packages into a centralized '@oh-my-pi/pi-utils/dirs' module.
- Moved 30+ path helper functions (getAgentDir, getConfigRootDir, getPluginsDir, getMCPConfigPath, etc.) from scattered locations into a single shared utility module.
- Consolidated APP_NAME, CONFIG_DIR_NAME, and VERSION constants into the centralized dirs module for reuse across packages.
- Updated 70+ import statements across packages/ai, packages/coding-agent, packages/stats, and packages/tui to use the new centralized module.
- Removed local path construction logic and replaced with utility function calls for improved maintainability and consistency.
- Deleted packages/coding-agent/src/extensibility/plugins/paths.ts as its functions were moved to the centralized dirs module.
2026-02-13 15:06:05 +01:00
can1357 592e5e2191 feat(shell): added interactive shell console and cancellation token support to CLI
- Added interactive shell console subcommand to coding-agent CLI with support for working directory, timeout, and snapshot configuration.
- Added cancellation token support to ExecutionContext and ExecutionParameters for graceful shell execution interruption.
- Implemented cancellation checks throughout AST execution pipeline (Program, CompoundList, AndOrList, Pipeline, and all command types) to enable responsive interruption.
- Replaced process tracking mechanism with tokio_util CancellationToken for improved async cancellation handling.
- Added tokio-util 0.7.16 dependency to pi-natives crate for cancellation token support.
2026-02-01 19:16:57 +01:00