Fix/openclaude diagnostics settings (#483)

* fix: use openclaude paths in diagnostics and settings

* fix: strip leaked reasoning from assistant output

* fix: preserve legacy claude config compatibility

* fix: tighten path and reasoning compatibility

* fix: buffer streamed reasoning leak preambles

* test: cover openclaude migration and reasoning fixes

* test: isolate execFileNoThrow from cross-file mocks
This commit is contained in:
Kevin Codex
2026-04-09 20:42:51 +08:00
committed by GitHub
parent 32fbd0c7b4
commit 42b121bd0d
23 changed files with 934 additions and 101 deletions

View File

@@ -76,6 +76,7 @@ export const DANGEROUS_DIRECTORIES = [
'.vscode',
'.idea',
'.claude',
'.openclaude',
] as const
/**
@@ -208,6 +209,8 @@ export function isClaudeSettingsPath(filePath: string): boolean {
// Use platform separator so endsWith checks work on both Unix (/) and Windows (\)
if (
normalizedPath.endsWith(`${sep}.openclaude${sep}settings.json`) ||
normalizedPath.endsWith(`${sep}.openclaude${sep}settings.local.json`) ||
normalizedPath.endsWith(`${sep}.claude${sep}settings.json`) ||
normalizedPath.endsWith(`${sep}.claude${sep}settings.local.json`)
) {
@@ -233,11 +236,17 @@ function isClaudeConfigFilePath(filePath: string): boolean {
const commandsDir = join(getOriginalCwd(), '.claude', 'commands')
const agentsDir = join(getOriginalCwd(), '.claude', 'agents')
const skillsDir = join(getOriginalCwd(), '.claude', 'skills')
const openCommandsDir = join(getOriginalCwd(), '.openclaude', 'commands')
const openAgentsDir = join(getOriginalCwd(), '.openclaude', 'agents')
const openSkillsDir = join(getOriginalCwd(), '.openclaude', 'skills')
return (
pathInWorkingPath(filePath, commandsDir) ||
pathInWorkingPath(filePath, agentsDir) ||
pathInWorkingPath(filePath, skillsDir)
pathInWorkingPath(filePath, skillsDir) ||
pathInWorkingPath(filePath, openCommandsDir) ||
pathInWorkingPath(filePath, openAgentsDir) ||
pathInWorkingPath(filePath, openSkillsDir)
)
}