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:
brooklyn! 2026-04-28 22:45:14 -07:00 committed by GitHub
commit 5e68503d2f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 309 additions and 161 deletions

View file

@ -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) {