Skip to content

Conversation

@veracioux
Copy link
Contributor

Closes #3714.

@thdxr
Copy link
Contributor

thdxr commented Nov 2, 2025

can you help me understand why using display isn't enough? would try to avoid introducing a new concept if possible. also don't think we need to move the autocomplete to a signal, i think we can just fetch the command dynamically

@veracioux
Copy link
Contributor Author

@thdxr A few reasons for introducing trigger in addition to display

  • For commands, display contains trailing padding, and using it for matching a command from the textarea input is problematic, We could use display.trim() but IMO it's better to restrict display to presentation only, and avoid implicit assumptions about it
  • I think it's better to be explicit about what the trigger is and the kinds values it can take, including the type constraint I added to validate it as a string literal starting with @ or /
  • For files, display does not contain @, whereas the trigger does (not relevant for this PR, but a nice-to-have regarding prior point about explicitness)

Point taken about the autocomplete signal, I'll make a change regarding that.

@veracioux veracioux force-pushed the fix/slash-prefixed-prompt-content branch from bd4b9ee to b55403d Compare November 3, 2025 08:25
@veracioux
Copy link
Contributor Author

Reverted changing autocomplete to a signal. Now it's a variable again.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenTUI: Opening a chat with a file path breaks OpenCode

2 participants