Skip to content

Commit 3276766

Browse files
authored
fix(tarko-agent-server): fix agent events problem (#1666)
1 parent db0aade commit 3276766

File tree

3 files changed

+1
-21
lines changed

3 files changed

+1
-21
lines changed

multimodal/tarko/agent-server-next/examples/bootstrap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const server = new AgentServer({
6565
agentMode: {
6666
id: runtimeSettings.agentMode,
6767
browserMode: runtimeSettings.browserMode,
68-
link: 'http://example.com',
68+
link: runtimeSettings.link || '',
6969
},
7070
};
7171
},

multimodal/tarko/agent-server-next/src/services/session/AgentSessionFactory.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -120,16 +120,6 @@ export class AgentSessionFactory {
120120
// Initialize the session
121121
const { storageUnsubscribe } = await session.initialize();
122122

123-
// If runtime settings were provided and session is active, update the agent configuration
124-
if (runtimeSettings && savedSessionInfo) {
125-
try {
126-
await session.updateSessionConfig(savedSessionInfo);
127-
console.log('Session created with runtime settings', { sessionId, runtimeSettings });
128-
} catch (error) {
129-
console.error('Failed to apply runtime settings to new session', { sessionId, error });
130-
// Continue execution - the runtime settings are saved, will apply on next session restart
131-
}
132-
}
133123

134124
// Wait a short time to ensure all initialization events are persisted
135125
// This handles the async nature of event storage during agent initialization

multimodal/tarko/agent-server/src/api/controllers/sessions.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,6 @@ export async function createSession(req: Request, res: Response) {
112112
server.storageUnsubscribes[sessionId] = storageUnsubscribe;
113113
}
114114

115-
// If runtime settings were provided and session is active, update the agent configuration
116-
if (runtimeSettings && savedSessionInfo) {
117-
try {
118-
await session.updateSessionConfig(savedSessionInfo);
119-
console.log('Session created with runtime settings', { sessionId, runtimeSettings });
120-
} catch (error) {
121-
console.error('Failed to apply runtime settings to new session', { sessionId, error });
122-
// Continue execution - the runtime settings are saved, will apply on next session restart
123-
}
124-
}
125115

126116
// Wait a short time to ensure all initialization events are persisted
127117
// This handles the async nature of event storage during agent initialization

0 commit comments

Comments
 (0)