SurfSense/surfsense_web/features/artifacts-library/model/artifact.ts
Anish Sarkar a8c1fb660d feat(rename): complete searchSpace to workspace transition across frontend and backend
- Introduced a comprehensive specification for renaming `searchSpace` to `workspace` in `surfsense_web` and `surfsense_desktop`, ensuring all TypeScript identifiers, React props, and local data structures are updated.
- Implemented migration shims for persisted local state to prevent data loss during the transition.
- Updated observability metrics and IPC channels to reflect the new naming convention.
- Removed legacy `active-search-space` module and replaced it with `active-workspace` to maintain consistency.
- Ensured no behavioral changes or data loss for users during the renaming process.
2026-07-06 15:12:40 +05:30

23 lines
877 B
TypeScript

/** Deliverable kinds surfaced in the workspace-wide artifacts library. */
export type LibraryArtifactKind = "report" | "resume" | "podcast" | "video" | "image";
export type LibraryArtifactStatus = "ready" | "running" | "error";
/**
* A deliverable aggregated from the workspace's list endpoints. The heavy
* content (report body, audio, video frames, image bytes) is fetched lazily by
* the viewer when a card is opened.
*/
export interface LibraryArtifact {
/** Stable list key — `${kind}-${entityId}`. */
key: string;
kind: LibraryArtifactKind;
entityId: number;
title: string;
status: LibraryArtifactStatus;
createdAt: string;
/** Report panel content type — "typst" for resumes, "markdown" otherwise. */
contentType: "markdown" | "typst";
/** Chat thread that produced this artifact, when the source recorded one. */
sourceThreadId?: number | null;
}