9p: remove routing logic from prompt handler
Submit on core now decides whether to inject or start a new turn. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
2ac1f85a92
commit
386b4f9ec8
|
|
@ -658,12 +658,6 @@ func (s *Server) handleWrite(path, input string) {
|
|||
|
||||
switch fileName {
|
||||
case "prompt":
|
||||
// If the agent is busy, inject mid-turn instead of starting a new turn.
|
||||
if sess.core.IsRunning() {
|
||||
sess.core.Inject(input)
|
||||
sess.appendChat([]byte("user (interrupt): " + input + "\n"))
|
||||
return
|
||||
}
|
||||
sess.core.Submit(sess.ctx, input, publish)
|
||||
sess.mu.Lock()
|
||||
sess.replyVers++
|
||||
|
|
|
|||
Reference in New Issue