mirror of
https://github.com/stablyai/orca.git
synced 2026-10-09 08:02:35 +00:00
A pasted screenshot lived in the OS temp folder with a read permission held in memory, so a draft could only bring it back as a placeholder. Local pastes are now written to Orca's own native-chat-pastes folder under the app's user data, and a draft keeps them as real images. On restore the composer asks the main process to re-grant each one; main grants a read only when the file's real path, symlinks and junctions resolved, is inside that folder, and reports anything else as not kept, which becomes the placeholder. Pastes older than 30 days are deleted at startup, far past the host's 24 hour window for a resent message; the sweep never follows a link and never blocks startup. SSH pastes and older temp-folder pastes still come back as placeholders.
4 lines
214 B
TypeScript
4 lines
214 B
TypeScript
/** The folder under the app's user data where local native-chat pastes are kept, so a draft that
|
|
* names one can show and send it after a restart. */
|
|
export const NATIVE_CHAT_PASTE_FOLDER = 'native-chat-pastes'
|