mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-02 02:01:47 +00:00
Merge pull request #13590 from NousResearch/bb/tui-enter-applies-path-completion
fix(tui): apply path/@ completion on Enter
This commit is contained in:
commit
c0db4d529d
1 changed files with 2 additions and 2 deletions
|
|
@ -234,11 +234,11 @@ export function useSubmission(opts: UseSubmissionOptions) {
|
|||
|
||||
const submit = useCallback(
|
||||
(value: string) => {
|
||||
if (value.startsWith('/') && composerState.completions.length) {
|
||||
if (composerState.completions.length) {
|
||||
const row = composerState.completions[composerState.compIdx]
|
||||
|
||||
if (row?.text) {
|
||||
const text = row.text.startsWith('/') && composerState.compReplace > 0 ? row.text.slice(1) : row.text
|
||||
const text = value.startsWith('/') && row.text.startsWith('/') ? row.text.slice(1) : row.text
|
||||
const next = value.slice(0, composerState.compReplace) + text
|
||||
|
||||
if (next !== value) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue