feat: auto-delete old conversations, and stop a tool call that repeats (#15)
This commit was merged in pull request #15.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user