mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-11 02:33:51 +08:00
feat: Enhance CLI components with icons and improve file editing capabilities
- Added icons to the CLI History and CLI Tools headers for better UI representation. - Updated CLI Status component to include tool-specific classes for styling. - Refactored CCW Install Panel to improve layout and functionality, including upgrade and uninstall buttons. - Enhanced the edit-file tool with new features: - Support for creating parent directories when writing files. - Added dryRun mode for previewing changes without modifying files. - Implemented a unified diff output for changes made. - Enabled multi-edit support in update mode. - Introduced a new Smart Search Tool with multiple search modes (auto, exact, fuzzy, semantic, graph) and intent classification. - Created a Write File Tool to handle file creation and overwriting with backup options.
This commit is contained in:
@@ -331,6 +331,13 @@ async function copyDirectory(src, dest, manifest = null, excludeDirs = []) {
|
||||
*/
|
||||
function getVersion() {
|
||||
try {
|
||||
// First try root package.json (parent of ccw)
|
||||
const rootPkgPath = join(getSourceDir(), 'package.json');
|
||||
if (existsSync(rootPkgPath)) {
|
||||
const pkg = JSON.parse(readFileSync(rootPkgPath, 'utf8'));
|
||||
if (pkg.version) return pkg.version;
|
||||
}
|
||||
// Fallback to ccw package.json
|
||||
const pkgPath = join(getPackageRoot(), 'package.json');
|
||||
const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
|
||||
return pkg.version || '1.0.0';
|
||||
|
||||
@@ -32,6 +32,13 @@ function getSourceDir() {
|
||||
*/
|
||||
function getVersion() {
|
||||
try {
|
||||
// First try root package.json (parent of ccw)
|
||||
const rootPkgPath = join(getSourceDir(), 'package.json');
|
||||
if (existsSync(rootPkgPath)) {
|
||||
const pkg = JSON.parse(readFileSync(rootPkgPath, 'utf8'));
|
||||
if (pkg.version) return pkg.version;
|
||||
}
|
||||
// Fallback to ccw package.json
|
||||
const pkgPath = join(getPackageRoot(), 'package.json');
|
||||
const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
|
||||
return pkg.version || '1.0.0';
|
||||
|
||||
Reference in New Issue
Block a user