mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 16:43:16 +00:00
Add getLocalPrompt and setLocalPrompt functions to preferenceApi.ts
This commit is contained in:
@@ -66,10 +66,19 @@ export function getLocalRecentDocs(): string | null {
|
||||
return doc;
|
||||
}
|
||||
|
||||
export function getLocalPrompt(): string | null {
|
||||
const prompt = localStorage.getItem('DocsGPTPrompt');
|
||||
return prompt;
|
||||
}
|
||||
|
||||
export function setLocalApiKey(key: string): void {
|
||||
localStorage.setItem('DocsGPTApiKey', key);
|
||||
}
|
||||
|
||||
export function setLocalPrompt(prompt: string): void {
|
||||
localStorage.setItem('DocsGPTPrompt', prompt);
|
||||
}
|
||||
|
||||
export function setLocalRecentDocs(doc: Doc): void {
|
||||
localStorage.setItem('DocsGPTRecentDocs', JSON.stringify(doc));
|
||||
let namePath = doc.name;
|
||||
|
||||
Reference in New Issue
Block a user