Skip to content

Slash-command arguments should be inserted verbatim #755

Closed

Description

@breken-ai

What happened?

A command template containing $ARGUMENTS interprets dollar signs in the supplied text. On current main (3b73f8d), entering $$\\alpha + \\beta$$ with $& and $' kept produces $$ as $, turns $& into $ARGUMENTS, and drops text after $'.

Steps to reproduce

  1. Create a command template whose body is Explain: $ARGUMENTS.
  2. Invoke it with $$\\alpha + \\beta$$ with $& and $' kept.
  3. Observe the command text passed to the model; it no longer matches the input.

The focused regression in test/session/command-arguments.test.ts fails on 3b73f8d and passes with the fix. It stops before any model call.

How did you install OpenScience?

From source (bun dev).

OpenScience version

Source commit 3b73f8d.

Provider and model

Not applicable; the reproduction captures the command before a model call.

Operating system

Not OS-specific; reproduced in the Bun test harness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions