Add secret and global state management + messaging between web and extension; persist API key and max num requests; add Welcome screen

This commit is contained in:
Saoud Rizwan
2024-07-07 11:22:16 -04:00
parent 991ea6bd4e
commit 8ba1be1167
10 changed files with 329 additions and 36 deletions

View File

@@ -2,7 +2,8 @@
// webview will hold state
export interface ExtensionMessage {
type: "text" | "action"
type: "text" | "action" | "webviewState"
text?: string
action?: "plusButtonTapped" | "settingsButtonTapped"
webviewState?: { didOpenOnce: boolean, apiKey?: string, maxRequestsPerTask?: number }
}