Skip to content

Comments

refactor: Extract the substitution behaviour used by custom slash commands to its own file so that it can be more easily reused by new features. #203

Open
ariane-emory wants to merge 7 commits intodevfrom
refactor/shared-substitute
Open

refactor: Extract the substitution behaviour used by custom slash commands to its own file so that it can be more easily reused by new features. #203
ariane-emory wants to merge 7 commits intodevfrom
refactor/shared-substitute

Conversation

@ariane-emory
Copy link
Owner

@ariane-emory ariane-emory commented Feb 20, 2026

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

This PR extracts the substitution behaviour used by custom slash commands into a new function in its own file, so that it can later be reused when we add the opencode expand command in the feat/opencode-expand branch in this reposiory.

ariane-emory and others added 6 commits February 16, 2026 11:02
Extracts argument substitution logic from session/prompt.ts to
config/substitute.ts for reuse by other features like the expand
command.

Handles:
- $1, $2, etc. positional arguments (last one swallows remaining)
- $ARGUMENTS placeholder (all args joined)
@github-actions
Copy link

Hey! Your PR title Refactor/shared substitute doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@github-actions
Copy link

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • No "Type of change" checkbox is checked. Please select at least one.
  • No issue referenced. Please add Closes #<number> linking to the relevant issue.
  • "How did you verify your code works?" section is empty. Please explain how you tested.
  • Not all checklist items are checked. Please confirm you have tested locally and have not included unrelated changes.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@ariane-emory ariane-emory changed the title Refactor/shared substitute refactor: Extract the substitution behaviour used by custom slash commands to its own file so that it can be more easily reused by new features. Feb 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant