Add a pause that holds an agent after its current step
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
"unicode/utf8"
|
||||
|
||||
"g.fc.run/ai/byre/internal/api"
|
||||
"g.fc.run/ai/byre/internal/claude"
|
||||
"g.fc.run/ai/byre/internal/hookcmd"
|
||||
"g.fc.run/ai/byre/internal/store"
|
||||
"g.fc.run/ai/byre/internal/todo"
|
||||
)
|
||||
@@ -49,7 +49,7 @@ func asksQuestion(text string) bool {
|
||||
return endsQuestion.MatchString(paras[len(paras)-1])
|
||||
}
|
||||
|
||||
func (m *Manager) bounceProseQuestion(l *live) claude.HookFunc {
|
||||
func (m *Manager) bounceProseQuestion(l *live) hookcmd.Func {
|
||||
return func(ctx context.Context, input json.RawMessage) (map[string]any, error) {
|
||||
in := struct {
|
||||
LastAssistantMessage string `json:"last_assistant_message"`
|
||||
@@ -68,7 +68,7 @@ func (m *Manager) bounceProseQuestion(l *live) claude.HookFunc {
|
||||
}
|
||||
|
||||
func (m *Manager) takeBounce(ctx context.Context, l *live, final string) (bool, error) {
|
||||
if !asksQuestion(final) {
|
||||
if !asksQuestion(final) || m.isPaused(l.id) {
|
||||
return false, nil
|
||||
}
|
||||
first, err := m.store.FirstPrompt(ctx, l.taskID)
|
||||
@@ -159,7 +159,7 @@ func forkGuidance(task, src api.Task) string {
|
||||
src.Title, *task.ForkedAt, task.Branch, task.WorktreePath, src.WorktreePath, task.WorktreePath)
|
||||
}
|
||||
|
||||
func remindGuidance(text string) claude.HookFunc {
|
||||
func remindGuidance(text string) hookcmd.Func {
|
||||
return func(ctx context.Context, input json.RawMessage) (map[string]any, error) {
|
||||
return map[string]any{
|
||||
"hookSpecificOutput": map[string]any{
|
||||
|
||||
Reference in New Issue
Block a user