import { URI } from "../../../../../base/common/uri.js"; import { DisposableStore } from "../../../../../base/common/lifecycle.js"; import { ServicesAccessor } from "../../../../../editor/browser/editorExtensions.js"; import { PromptsStorage } from "../../common/promptSyntax/service/promptsService.js"; import { Target } from "../../common/promptSyntax/promptTypes.js"; import { ITextEditorSelection } from "../../../../../platform/editor/common/editor.js"; import { IWorkspaceContextService } from "../../../../../platform/workspace/common/workspace.service.js"; /** * Optional callbacks and settings for customizing the hook creation and opening behaviour. * The agentic editor passes these to open hooks in the embedded editor and * track worktree files for auto-commit. */ export interface IHookQuickPickOptions { /** Override how the hook file is opened. If not provided, uses editorService.openEditor. */ readonly openEditor?: (resource: URI, options?: { selection?: ITextEditorSelection; }) => Promise; /** Called after a new hook file is created on disk. */ readonly onHookFileCreated?: (uri: URI) => void; /** Filter the displayed hook types to those supported by the given target. */ readonly target?: Target; /** Restrict hook files and creation destinations to one storage scope. */ readonly preferredStorage?: PromptsStorage; /** Restrict workspace hook files and creation destinations to one workspace folder. */ readonly workspaceFolder?: URI; } export declare function isHookResourceInWorkspace(resource: URI, workspaceFolder: URI | undefined, workspaceService: IWorkspaceContextService): boolean; /** * Shows the Configure Hooks quick pick UI, allowing the user to view, * open, or create hooks. Can be called from the action or slash command. */ export declare function showConfigureHooksQuickPick(accessor: ServicesAccessor, options?: IHookQuickPickOptions): Promise; /** * Helper to register the `Manage Hooks` action. */ export declare function registerHookActions(): DisposableStore;