mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-26 06:01:49 +00:00
Merge pull request #17190 from NousResearch/bb/tui-cold-start-profiling
perf(tui): cut visible cold start ~57% with lazy agent init
This commit is contained in:
commit
5e68503d2f
10 changed files with 309 additions and 161 deletions
|
|
@ -126,6 +126,13 @@ export function useSubmission(opts: UseSubmissionOptions) {
|
|||
return sys('session not ready yet')
|
||||
}
|
||||
|
||||
// Plain prompts are the common path and should not pay an extra RPC
|
||||
// before prompt.submit. File-drop detection still runs for absolute,
|
||||
// tilde, file://, and explicit relative paths.
|
||||
if (!looksLikeSlashCommand(text) && !/(?:^|\s)(?:file:\/\/|~\/|\.?\.\/|\/)[^\s]+/.test(text)) {
|
||||
return startSubmit(text, expand(text), showUserMessage)
|
||||
}
|
||||
|
||||
gw.request<InputDetectDropResponse>('input.detect_drop', { session_id: sid, text })
|
||||
.then(r => {
|
||||
if (!r?.matched) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue