refactor(agent): Pi 会话运行时 - 接入原生 Agent 与 Skills 工具链
This commit is contained in:
1 parent
f9b8c5a43e
commit
387d3562ad
69 files changed
+11460
-207
No files matched your search
@@ -52,25 +52,6 @@ func (w *taskWorkerCoordinator) start(ctx context.Context) {
|
||||
s.startProviderCancellationReconciliation(ctx)
|
||||
s.startBillingReviewAudit(ctx)
|
||||
s.startAgentMemoryCompactScheduler()
|
||||
s.runWorkerLoop(func(ctx context.Context) {
|
||||
ticker := time.NewTicker(2 * time.Second)
|
||||
defer ticker.Stop()
|
||||
for {
|
||||
if ctx.Err() != nil {
|
||||
return
|
||||
}
|
||||
if !s.IsDraining() {
|
||||
s.advanceCloudAgents()
|
||||
}
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return
|
||||
case <-s.agentSchedulerWake:
|
||||
continue
|
||||
case <-ticker.C:
|
||||
}
|
||||
}
|
||||
})
|
||||
s.runWorkerLoop(func(ctx context.Context) {
|
||||
slots := make(chan struct{}, maxChannelConcurrencyLimit)
|
||||
dispatch := func() {
|
||||
@@ -149,9 +130,6 @@ func (w *taskWorkerCoordinator) processNextTask() error {
|
||||
|
||||
func (w *taskWorkerCoordinator) processClaimedTask(task *model.Task, globalSlot *platform.SlotLease) error {
|
||||
s := w.service
|
||||
if task != nil && task.Operation == cloudAgentStepOperation {
|
||||
defer s.wakeCloudAgentScheduler()
|
||||
}
|
||||
terminal := s.terminalCoordinator()
|
||||
policyCtx, cancelPolicy := context.WithTimeout(context.Background(), 3*time.Second)
|
||||
reader := &Service{repo: s.repo.WithContext(policyCtx)}
|
||||
|
||||
Reference in new issue
Block a user