mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-13 22:15:33 +00:00
refactor(hooks): deprecate block-image-read, add CLIProxy fallback
- Remove redundant block-image-read.cjs hook (image-analyzer handles all) - Add fallback blocking when CLIProxy unavailable (prevents context overflow) - Simplify fallback message to prevent context pollution/hallucination - Remove image-read-block-hook-env.ts and related exports - Update comments per PR #442 review suggestions - Add defensive check for empty models array Closes #426
This commit is contained in:
1 parent
26f4021770
commit
51b719ef34
11 files changed
+47
-362
No files matched your search
@@ -7,7 +7,6 @@
|
||||
import { spawn, ChildProcess } from 'child_process';
|
||||
import { ErrorManager } from './error-manager';
|
||||
import { getWebSearchHookEnv } from './websearch-manager';
|
||||
import { getImageReadBlockHookEnv } from './hooks/image-read-block-hook-env';
|
||||
|
||||
/**
|
||||
* Escape arguments for shell execution (Windows compatibility)
|
||||
@@ -53,12 +52,11 @@ export function execClaude(
|
||||
|
||||
// Get WebSearch hook config env vars
|
||||
const webSearchEnv = getWebSearchHookEnv();
|
||||
const imageReadBlockEnv = getImageReadBlockHookEnv();
|
||||
|
||||
// Prepare environment (merge with process.env if envVars provided)
|
||||
const env = envVars
|
||||
? { ...process.env, ...envVars, ...webSearchEnv, ...imageReadBlockEnv }
|
||||
: { ...process.env, ...webSearchEnv, ...imageReadBlockEnv };
|
||||
? { ...process.env, ...envVars, ...webSearchEnv }
|
||||
: { ...process.env, ...webSearchEnv };
|
||||
|
||||
let child: ChildProcess;
|
||||
if (needsShell) {
|
||||
|
||||
Reference in new issue
Block a user