feat: auto-delete old conversations, and stop a tool call that repeats

This commit is contained in:
2026-10-05 16:59:38 +08:00
parent 576c5946f7
commit d27c4374fe
25 changed files with 2004 additions and 55 deletions
+21
View File
@@ -47,6 +47,27 @@ export function getPreferenceValues<T = Record<string, unknown>>(): T {
return preferenceOverride as T;
}
/**
* Toast stubs.
*
* Recorded rather than discarded, so a test can assert that a sweep only speaks
* up when it actually deleted something.
*/
export const __toasts: { title: string; message?: string }[] = [];
export const Toast = {
Style: { Success: "success", Failure: "failure", Animated: "animated" },
};
export async function showToast(options: { title: string; message?: string }): Promise<void> {
__toasts.push({ title: options.title, message: options.message });
}
/** Test-only helper: forgets the toasts shown so far. */
export function __resetToasts(): void {
__toasts.length = 0;
}
/**
* The runtime `environment`. Only `supportPath` is exercised, by the snip
* directory, and a stable fake path keeps those assertions independent of where