Skip to content

Custom Cancel-Keyword breaks clickable Chat cancellation #82

Description

@CyR1en

Affected version

CommandPrompterPaper 3.1.1 and the current development branch (5534104).

Description

Changing Cancel-Keyword breaks the clickable cancellation control appended to Chat prompts.

Steps to reproduce

  1. Set Cancel-Keyword: abort.
  2. Start a Chat prompt.
  3. Click its cancel component.

Expected behavior

The active session is cancelled. Typing abort and clicking the control should both work.

Actual behavior

The component runs /cmdp abort, which is not registered, so the session remains active. Typing abort as the prompt answer still cancels correctly.

Technical cause

ChatPromptScreen constructs /cmdp plus the configured answer keyword (ChatPromptScreen.java:64-68), while CancelCommand registers only the literal cancel subcommand.

Closed #11 concerned typed custom-keyword handling; it does not cover this clickable-command regression.

Suggested direction

Make the clickable component always invoke the stable /cmdp cancel command, independent of the keyword accepted as prompt input. Add a test with a non-default keyword.

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions