Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

542 B
Raw Blame
import { toast } from '@core/component/Toast/Toast';
import { setAgentSessionArchived } from '@queries/agent-session/entity-mutations';

export async function changeSessionArchiveState(
  sessionId: string,
  archived: boolean
): Promise<boolean> {
  try {
    await setAgentSessionArchived(sessionId, archived);
    toast.success(archived ? 'Session archived' : 'Session unarchived');
    return true;
  } catch {
    toast.failure(
      archived ? 'Unable to archive session' : 'Unable to unarchive session'
    );
    return false;
  }
}