feat: add privacy mode, thinking levels, PWA support, and i18n
- Add privacy mode to hide IP and user preferences from AI requests - Add model thinking levels (low/medium/high) for context analysis depth - Add PWA support with service worker, manifest, and app icons - Add SettingsPanel for user preferences (theme, background, language) - Add i18n translations for en/zh/ja/ko/de/fr - Add Pinia store for centralized settings management - Update backend to support user preferences and thinking levels - Update config to use absolute API URLs
This commit is contained in:
@@ -51,11 +51,11 @@ export const copilotGhostMark = $markSchema('copilot_ghost', () => ({
|
||||
toDOM: () => ['span', { 'data-copilot-ghost': '', class: 'copilot-ghost-text' }, 0],
|
||||
parseMarkdown: {
|
||||
match: () => false,
|
||||
runner: () => {}
|
||||
runner: () => { }
|
||||
},
|
||||
toMarkdown: {
|
||||
match: (mark) => mark.type.name === 'copilot_ghost',
|
||||
runner: () => {}
|
||||
runner: () => { }
|
||||
}
|
||||
}))
|
||||
|
||||
@@ -331,7 +331,7 @@ function scheduleFetch(view: EditorView, runtime: CopilotRuntime, pos: number) {
|
||||
const doc = view.state.doc
|
||||
const schema = view.state.schema
|
||||
const baseSize = doc.content.size
|
||||
|
||||
|
||||
const serializer = runtime.ctx.get(serializerCtx)
|
||||
let prefixMarkdown = ''
|
||||
let suffixMarkdown = ''
|
||||
@@ -356,7 +356,7 @@ function scheduleFetch(view: EditorView, runtime: CopilotRuntime, pos: number) {
|
||||
const totalTextLen = (prefixMarkdown + suffixMarkdown).length
|
||||
const ocrContextLen = requestPrefix.length - prefixMarkdown.length
|
||||
const totalWithOcr = totalTextLen + ocrContextLen
|
||||
|
||||
|
||||
const overLimit = totalWithOcr > SIZE_LIMIT
|
||||
|
||||
if (overLimit) {
|
||||
|
||||
Reference in New Issue
Block a user