Files
boocode/apps/server/src/services/tools/codecontext/watch_changes.ts
indifferentketchup 8c200216eb refactor: codebase audit cleanup — dead code, dedup, module splits
Multi-agent audit + aggressive cleanup across server/web/coder/booterm,
delivered behind a DEFER discipline so none of the in-flight files were
touched. Removes dead code/deps/columns, dedups server + coder helpers,
and splits the oversized modules (tools.ts, opencode-server.ts,
sentinel-summaries, turn.ts, TerminalPane.tsx) behind stable contracts.
Adds 78 parity/unit tests (server 587, coder 323); fixes two latent bugs
(ChatPane queue keys, FileViewerOverlay blank-line parity).

Intended tag: v2.7.12-audit-cleanup.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 21:12:29 +00:00

34 lines
1.0 KiB
TypeScript

import { z } from 'zod';
import { makeCodecontextTool } from './factory.js';
export const WatchChangesInput = z.object({
enable: z.boolean(),
});
export type WatchChangesInputT = z.infer<typeof WatchChangesInput>;
const DESCRIPTION =
"Turn codecontext's file watcher on or off for this project. " +
'When on, codecontext re-analyzes files in the background as they change (debounced). Default is on. ' +
"Disable temporarily if you're doing bulk edits and want to avoid analysis churn.";
const { toolDef: watchChanges, execute: executeWatchChanges } =
makeCodecontextTool<WatchChangesInputT>({
name: 'watch_changes',
schema: WatchChangesInput,
description: DESCRIPTION,
jsonParameters: {
type: 'object',
properties: {
enable: {
type: 'boolean',
description: 'true = enable the watcher; false = disable.',
},
},
required: ['enable'],
additionalProperties: false,
},
mapArgs: (input) => ({ enable: input.enable }),
});
export { watchChanges, executeWatchChanges };