Spaces:
Sleeping

File size: 426 Bytes
90b3952
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
/**
 * Restores the default prompt from local storage.
 *
 * This function retrieves the `defaultPrompt` stored in local storage
 * and sets it as the `userPrompt` in both the app state and local storage.
 *
 * @param {Object} app - The Alpine component instance.
 */
export function restoreDefaultPrompt(app) {
  app.userPrompt = localStorage.getItem("defaultPrompt");
  localStorage.setItem("userPrompt", app.userPrompt);
}