feat(telegram): /stop stops the chat agent, else the tasks it created, or one task; delete the dead approval actions
This commit is contained in:
1 parent
399098329b
commit
b0f1ad7cdc
52 files changed
+2385
-2781
No files matched your search
@@ -255,6 +255,6 @@ func (b *server) setupGatewayChat(ctx context.Context, actor gateway.ChatTaskAct
|
||||
router.Log = b.log
|
||||
return &gateway.LocalChatAdapter{
|
||||
Router: router, Sessions: b.chatSessionStore, Turns: gateway.NewTurns(b.log),
|
||||
Models: b.chatModels, Personas: b.personas, TaskActor: actor,
|
||||
Models: b.chatModels, Personas: b.personas, TaskActor: actor, Tasks: b.stateStore,
|
||||
}, nil
|
||||
}
|
||||
@@ -15,17 +15,17 @@ import (
|
||||
type Writer struct {
|
||||
Enqueue func(
|
||||
ctx context.Context,
|
||||
owner, repo, title, body, workflow, identity string,
|
||||
owner, repo, title, body, workflow, identity, origin string,
|
||||
inputs map[string]any,
|
||||
) (*workflow.Task, error)
|
||||
}
|
||||
|
||||
func (a Writer) EnqueueChatTask(
|
||||
ctx context.Context,
|
||||
owner, repo, title, body, workflow, identity string,
|
||||
owner, repo, title, body, workflow, identity, origin string,
|
||||
inputs map[string]any,
|
||||
) (int64, error) {
|
||||
task, err := a.Enqueue(ctx, owner, repo, title, body, workflow, identity, inputs)
|
||||
task, err := a.Enqueue(ctx, owner, repo, title, body, workflow, identity, origin, inputs)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user