Spaces:
Runtime error

lucas / client /src /utils /settings.js
lemachinarbo
fresh start
90b3952
Raw History Blame Contribute Delete
426 Bytes
/**
* 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);
}