fix: restore public store and invalidateSession on LettaBot (#515)
This commit is contained in:
@@ -187,7 +187,7 @@ export function resolveHeartbeatConversationKey(
|
||||
}
|
||||
|
||||
export class LettaBot implements AgentSession {
|
||||
private store: Store;
|
||||
readonly store: Store;
|
||||
private config: BotConfig;
|
||||
private channels: Map<string, ChannelAdapter> = new Map();
|
||||
private messageQueue: Array<{ msg: InboundMessage; adapter: ChannelAdapter }> = [];
|
||||
@@ -485,6 +485,14 @@ export class LettaBot implements AgentSession {
|
||||
return this.sessionManager.warmSession();
|
||||
}
|
||||
|
||||
/**
|
||||
* Invalidate cached session(s), forcing a fresh session on next message.
|
||||
* The next message will create a fresh session using the current store state.
|
||||
*/
|
||||
invalidateSession(key?: string): void {
|
||||
this.sessionManager.invalidateSession(key);
|
||||
}
|
||||
|
||||
// =========================================================================
|
||||
// Channel management
|
||||
// =========================================================================
|
||||
|
||||
Reference in New Issue
Block a user