mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-08 03:01:47 +00:00
This reverts commit ffd2621039.
This commit is contained in:
parent
ffd2621039
commit
9a70260490
8 changed files with 2 additions and 291 deletions
|
|
@ -570,17 +570,6 @@ export function createGatewayEventHandler(ctx: GatewayEventHandlerContext): (ev:
|
|||
sys(`error: ${message}`)
|
||||
setStatus('ready')
|
||||
}
|
||||
|
||||
return
|
||||
case 'onboarding.hint': {
|
||||
const text = String(ev.payload?.text || '').trim()
|
||||
|
||||
if (text) {
|
||||
sys(`(tip) ${text}`)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { type MutableRefObject, useCallback, useRef } from 'react'
|
|||
import { attachedImageNotice } from '../domain/messages.js'
|
||||
import { looksLikeSlashCommand } from '../domain/slash.js'
|
||||
import type { GatewayClient } from '../gatewayClient.js'
|
||||
import type { InputDetectDropResponse, OnboardingClaimResponse, PromptSubmitResponse, ShellExecResponse } from '../gatewayTypes.js'
|
||||
import type { InputDetectDropResponse, PromptSubmitResponse, ShellExecResponse } from '../gatewayTypes.js'
|
||||
import { asRpcResult } from '../lib/rpc.js'
|
||||
import { hasInterpolation, INTERPOLATION_RE } from '../protocol/interpolation.js'
|
||||
import { PASTE_SNIPPET_RE } from '../protocol/paste.js'
|
||||
|
|
@ -218,22 +218,6 @@ export function useSubmission(opts: UseSubmissionOptions) {
|
|||
composerActions.pushHistory(full)
|
||||
|
||||
if (getUiState().busy) {
|
||||
// First-touch onboarding: teach the TUI's auto-queue + double-Enter
|
||||
// interrupt pattern the first time the user hits it. Claim is
|
||||
// atomic server-side (config.yaml latch), shared with CLI + gateway.
|
||||
gw.request<OnboardingClaimResponse>('onboarding.claim', { flag: 'busy_input_prompt' })
|
||||
.then(raw => {
|
||||
const r = asRpcResult<OnboardingClaimResponse>(raw)
|
||||
const text = r?.hint
|
||||
|
||||
if (typeof text === 'string' && text.trim()) {
|
||||
sys(`(tip) ${text.trim()}`)
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
// Onboarding is best-effort — never block the enqueue path.
|
||||
})
|
||||
|
||||
return composerActions.enqueue(full)
|
||||
}
|
||||
|
||||
|
|
@ -245,7 +229,7 @@ export function useSubmission(opts: UseSubmissionOptions) {
|
|||
|
||||
send(full)
|
||||
},
|
||||
[appendMessage, composerActions, composerRefs, gw, interpolate, send, sendQueued, shellExec, slashRef, sys]
|
||||
[appendMessage, composerActions, composerRefs, interpolate, send, sendQueued, shellExec, slashRef]
|
||||
)
|
||||
|
||||
const submit = useCallback(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue