mirror of
https://github.com/harivansh-afk/clanker-agent.git
synced 2026-04-15 05:02:07 +00:00
Merge branch 'staging' of https://github.com/getcompanion-ai/companion-cloud into chat-timeout
This commit is contained in:
commit
c79ae1e621
2 changed files with 10 additions and 2 deletions
|
|
@ -842,6 +842,7 @@ export class GatewayRuntime {
|
|||
managedSession: ManagedGatewaySession,
|
||||
): GatewaySessionSnapshot {
|
||||
const messages = managedSession.session.messages;
|
||||
const currentModel = managedSession.session.model;
|
||||
const name = managedSession.session.sessionName?.trim() || undefined;
|
||||
let lastMessagePreview: string | undefined;
|
||||
for (let i = messages.length - 1; i >= 0; i--) {
|
||||
|
|
@ -881,6 +882,8 @@ export class GatewayRuntime {
|
|||
updatedAt: managedSession.lastActiveAt,
|
||||
name,
|
||||
lastMessagePreview,
|
||||
modelProvider: currentModel?.provider,
|
||||
modelId: currentModel?.id,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -1750,8 +1753,11 @@ export class GatewayRuntime {
|
|||
|
||||
private async handleReloadSession(sessionKey: string): Promise<void> {
|
||||
const managed = await this.requireExistingSession(sessionKey);
|
||||
// Reloading config by calling settingsManager.reload() on the session
|
||||
managed.session.settingsManager.reload();
|
||||
// Rebuild the full session runtime so auth.json, models.json, settings,
|
||||
// and extension-backed resources all pick up on-disk changes.
|
||||
await managed.session.reload();
|
||||
managed.lastActiveAt = Date.now();
|
||||
this.emitState(managed);
|
||||
}
|
||||
|
||||
getGatewaySessionDir(sessionKey: string): string {
|
||||
|
|
|
|||
|
|
@ -53,6 +53,8 @@ export interface GatewaySessionSnapshot {
|
|||
name?: string;
|
||||
lastMessagePreview?: string;
|
||||
updatedAt: number;
|
||||
modelProvider?: string;
|
||||
modelId?: string;
|
||||
}
|
||||
|
||||
export interface GatewaySessionState {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue