summaryrefslogtreecommitdiff
path: root/packages/cli/src/services/prompt-processors/argumentProcessor.ts
diff options
context:
space:
mode:
authorAbhi <[email protected]>2025-08-17 00:02:54 -0400
committerGitHub <[email protected]>2025-08-17 04:02:54 +0000
commit33b9bdb11e9371dfa6891ba1be47a12b958f493d (patch)
tree46ac192df7dd2aeaf35cb5eef5c121bc5decada9 /packages/cli/src/services/prompt-processors/argumentProcessor.ts
parente7dbc607a598c5270507d0ce7d55a3c98dcb0c0c (diff)
feat(cli): Introduce arguments for shell execution in custom commands (#5966)
Diffstat (limited to 'packages/cli/src/services/prompt-processors/argumentProcessor.ts')
-rw-r--r--packages/cli/src/services/prompt-processors/argumentProcessor.ts17
1 files changed, 3 insertions, 14 deletions
diff --git a/packages/cli/src/services/prompt-processors/argumentProcessor.ts b/packages/cli/src/services/prompt-processors/argumentProcessor.ts
index a7efeea9..9d5fc369 100644
--- a/packages/cli/src/services/prompt-processors/argumentProcessor.ts
+++ b/packages/cli/src/services/prompt-processors/argumentProcessor.ts
@@ -4,25 +4,14 @@
* SPDX-License-Identifier: Apache-2.0
*/
-import { IPromptProcessor, SHORTHAND_ARGS_PLACEHOLDER } from './types.js';
+import { IPromptProcessor } from './types.js';
import { CommandContext } from '../../ui/commands/types.js';
/**
- * Replaces all instances of `{{args}}` in a prompt with the user-provided
- * argument string.
- */
-export class ShorthandArgumentProcessor implements IPromptProcessor {
- async process(prompt: string, context: CommandContext): Promise<string> {
- return prompt.replaceAll(
- SHORTHAND_ARGS_PLACEHOLDER,
- context.invocation!.args,
- );
- }
-}
-
-/**
* Appends the user's full command invocation to the prompt if arguments are
* provided, allowing the model to perform its own argument parsing.
+ *
+ * This processor is only used if the prompt does NOT contain {{args}}.
*/
export class DefaultArgumentProcessor implements IPromptProcessor {
async process(prompt: string, context: CommandContext): Promise<string> {