mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-26 03:03:04 +00:00
refactor(agent): remove unused pending-run message identity
This commit is contained in:
@@ -2031,7 +2031,7 @@ export class AgentManager {
|
||||
const isReplacement = agent.pendingReplacement;
|
||||
agent.lastError = undefined;
|
||||
|
||||
const pendingRun = this.runs.createPendingRun(agentId, options?.clientMessageId);
|
||||
const pendingRun = this.runs.createPendingRun(agentId);
|
||||
|
||||
const streamForwarder = async function* streamForwarder(this: AgentManager) {
|
||||
let turnId: string;
|
||||
|
||||
@@ -13,7 +13,6 @@ export interface ForegroundTurnWaiter {
|
||||
export interface PendingForegroundRun {
|
||||
token: string;
|
||||
kind: "foreground";
|
||||
clientMessageId: string | null;
|
||||
stagedEvents: AgentStreamEvent[];
|
||||
turnId: string | null;
|
||||
started: boolean;
|
||||
@@ -42,8 +41,8 @@ export interface ForegroundRunAgentState {
|
||||
export class AgentRunState {
|
||||
private readonly runs = new Map<string, TrackedAgentRun>();
|
||||
|
||||
createPendingRun(agentId: string, clientMessageId?: string): PendingForegroundRun {
|
||||
const pendingRun = createPendingForegroundRun(clientMessageId ?? null);
|
||||
createPendingRun(agentId: string): PendingForegroundRun {
|
||||
const pendingRun = createPendingForegroundRun();
|
||||
this.runs.set(agentId, pendingRun);
|
||||
return pendingRun;
|
||||
}
|
||||
@@ -265,13 +264,12 @@ export class ForegroundTurnStream {
|
||||
}
|
||||
}
|
||||
|
||||
function createPendingForegroundRun(clientMessageId: string | null): PendingForegroundRun {
|
||||
function createPendingForegroundRun(): PendingForegroundRun {
|
||||
return {
|
||||
...createTrackedRunState(),
|
||||
kind: "foreground",
|
||||
turnId: null,
|
||||
started: false,
|
||||
clientMessageId,
|
||||
stagedEvents: [],
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user