mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-01-11 18:48:36 +08:00
* i18n: add translations for send shortcut setting * feat: configurable keyboard shortcut for sending messages * refactor,review: using storage key for send shortcut * Increase the width of the trigger in the settings dialog. Previously, at 160px, it hide the letter “d” from the word “Send.” * Update components/chat-input.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix: from review, ctrl send support for mac * refactor: from review, reduce local storage read * fix: make send shortcut setting reactive without page refresh --------- Co-authored-by: Biki Kalita <86558912+Biki-dev@users.noreply.github.com> Co-authored-by: Dayuan Jiang <34411969+DayuanJiang@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: dayuan.jiang <jdy.toh@gmail.com>
29 lines
1.0 KiB
TypeScript
29 lines
1.0 KiB
TypeScript
// Centralized localStorage keys for quota tracking and settings
|
|
// Chat data is now stored in IndexedDB via session-storage.ts
|
|
|
|
export const STORAGE_KEYS = {
|
|
// Quota tracking
|
|
requestCount: "next-ai-draw-io-request-count",
|
|
requestDate: "next-ai-draw-io-request-date",
|
|
tokenCount: "next-ai-draw-io-token-count",
|
|
tokenDate: "next-ai-draw-io-token-date",
|
|
tpmCount: "next-ai-draw-io-tpm-count",
|
|
tpmMinute: "next-ai-draw-io-tpm-minute",
|
|
|
|
// Settings
|
|
accessCode: "next-ai-draw-io-access-code",
|
|
closeProtection: "next-ai-draw-io-close-protection",
|
|
accessCodeRequired: "next-ai-draw-io-access-code-required",
|
|
aiProvider: "next-ai-draw-io-ai-provider",
|
|
aiBaseUrl: "next-ai-draw-io-ai-base-url",
|
|
aiApiKey: "next-ai-draw-io-ai-api-key",
|
|
aiModel: "next-ai-draw-io-ai-model",
|
|
|
|
// Multi-model configuration
|
|
modelConfigs: "next-ai-draw-io-model-configs",
|
|
selectedModelId: "next-ai-draw-io-selected-model-id",
|
|
|
|
// Chat input preferences
|
|
sendShortcut: "next-ai-draw-io-send-shortcut",
|
|
} as const
|