mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-03 15:43:11 +08:00
feat(cli-tools): add effort level configuration for Claude CLI
- Introduced effort level options (low, medium, high) in the CLI tool settings. - Updated the SettingsPage and CliToolCard components to handle effort level updates. - Enhanced CLI command options to accept effort level via --effort parameter. - Modified backend routes to support effort level updates in tool configurations. - Created a new CliViewerToolbar component for improved CLI viewer interactions. - Implemented logic to manage and display execution statuses and layouts in the CLI viewer.
This commit is contained in:
@@ -186,12 +186,9 @@ async function buildFileTree(
|
||||
for (const entry of entries) {
|
||||
const isDirectory = entry.isDirectory();
|
||||
|
||||
// Check if should be ignored
|
||||
if (shouldIgnore(entry.name, gitignorePatterns, isDirectory)) {
|
||||
// Allow hidden files if includeHidden is true and it's .claude or .workflow
|
||||
if (!includeHidden || (!entry.name.startsWith('.claude') && !entry.name.startsWith('.workflow'))) {
|
||||
continue;
|
||||
}
|
||||
// Check if should be ignored (pass includeHidden as showAll to skip all filtering)
|
||||
if (shouldIgnore(entry.name, gitignorePatterns, isDirectory, includeHidden)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const entryPath = join(normalizedPath, entry.name);
|
||||
@@ -326,17 +323,21 @@ function parseGitignore(gitignorePath: string): string[] {
|
||||
* @param {string} name - File or directory name
|
||||
* @param {string[]} patterns - Gitignore patterns
|
||||
* @param {boolean} isDirectory - Whether the entry is a directory
|
||||
* @param {boolean} showAll - When true, skip hardcoded excludes and hidden file filtering (only apply gitignore)
|
||||
* @returns {boolean}
|
||||
*/
|
||||
function shouldIgnore(name: string, patterns: string[], isDirectory: boolean): boolean {
|
||||
// Always exclude certain directories
|
||||
if (isDirectory && EXPLORER_EXCLUDE_DIRS.includes(name)) {
|
||||
return true;
|
||||
}
|
||||
function shouldIgnore(name: string, patterns: string[], isDirectory: boolean, showAll: boolean = false): boolean {
|
||||
// When showAll is true, only apply gitignore patterns (skip hardcoded excludes and hidden files)
|
||||
if (!showAll) {
|
||||
// Always exclude certain directories
|
||||
if (isDirectory && EXPLORER_EXCLUDE_DIRS.includes(name)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Skip hidden files/directories (starting with .)
|
||||
if (name.startsWith('.') && name !== '.claude' && name !== '.workflow') {
|
||||
return true;
|
||||
// Skip hidden files/directories (starting with .)
|
||||
if (name.startsWith('.')) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
for (const pattern of patterns) {
|
||||
@@ -626,6 +627,8 @@ export async function handleFilesRoutes(ctx: RouteContext): Promise<boolean> {
|
||||
const maxDepth = parseInt(url.searchParams.get('maxDepth') || '6', 10);
|
||||
const includeHidden = url.searchParams.get('includeHidden') === 'true';
|
||||
|
||||
console.log(`[Explorer] Tree request - rootPath: ${rootPath}, includeHidden: ${includeHidden}`);
|
||||
|
||||
const startTime = Date.now();
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user