@milkdown/crepe 7.20.0 → 7.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/builder.js +1 -0
- package/lib/cjs/builder.js.map +1 -1
- package/lib/cjs/feature/ai/index.js +1492 -0
- package/lib/cjs/feature/ai/index.js.map +1 -0
- package/lib/cjs/feature/block-edit/index.js +1 -0
- package/lib/cjs/feature/block-edit/index.js.map +1 -1
- package/lib/cjs/feature/code-mirror/index.js +1 -0
- package/lib/cjs/feature/code-mirror/index.js.map +1 -1
- package/lib/cjs/feature/cursor/index.js +1 -0
- package/lib/cjs/feature/cursor/index.js.map +1 -1
- package/lib/cjs/feature/image-block/index.js +1 -0
- package/lib/cjs/feature/image-block/index.js.map +1 -1
- package/lib/cjs/feature/latex/index.js +2 -0
- package/lib/cjs/feature/latex/index.js.map +1 -1
- package/lib/cjs/feature/link-tooltip/index.js +1 -0
- package/lib/cjs/feature/link-tooltip/index.js.map +1 -1
- package/lib/cjs/feature/list-item/index.js +1 -0
- package/lib/cjs/feature/list-item/index.js.map +1 -1
- package/lib/cjs/feature/placeholder/index.js +1 -0
- package/lib/cjs/feature/placeholder/index.js.map +1 -1
- package/lib/cjs/feature/table/index.js +1 -0
- package/lib/cjs/feature/table/index.js.map +1 -1
- package/lib/cjs/feature/toolbar/index.js +488 -3
- package/lib/cjs/feature/toolbar/index.js.map +1 -1
- package/lib/cjs/feature/top-bar/index.js +1 -0
- package/lib/cjs/feature/top-bar/index.js.map +1 -1
- package/lib/cjs/index.js +1424 -25
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/llm-providers/anthropic/index.js +147 -0
- package/lib/cjs/llm-providers/anthropic/index.js.map +1 -0
- package/lib/cjs/llm-providers/openai/index.js +138 -0
- package/lib/cjs/llm-providers/openai/index.js.map +1 -0
- package/lib/esm/builder.js +1 -0
- package/lib/esm/builder.js.map +1 -1
- package/lib/esm/feature/ai/index.js +1487 -0
- package/lib/esm/feature/ai/index.js.map +1 -0
- package/lib/esm/feature/block-edit/index.js +1 -0
- package/lib/esm/feature/block-edit/index.js.map +1 -1
- package/lib/esm/feature/code-mirror/index.js +1 -0
- package/lib/esm/feature/code-mirror/index.js.map +1 -1
- package/lib/esm/feature/cursor/index.js +1 -0
- package/lib/esm/feature/cursor/index.js.map +1 -1
- package/lib/esm/feature/image-block/index.js +1 -0
- package/lib/esm/feature/image-block/index.js.map +1 -1
- package/lib/esm/feature/latex/index.js +2 -0
- package/lib/esm/feature/latex/index.js.map +1 -1
- package/lib/esm/feature/link-tooltip/index.js +1 -0
- package/lib/esm/feature/link-tooltip/index.js.map +1 -1
- package/lib/esm/feature/list-item/index.js +1 -0
- package/lib/esm/feature/list-item/index.js.map +1 -1
- package/lib/esm/feature/placeholder/index.js +1 -0
- package/lib/esm/feature/placeholder/index.js.map +1 -1
- package/lib/esm/feature/table/index.js +1 -0
- package/lib/esm/feature/table/index.js.map +1 -1
- package/lib/esm/feature/toolbar/index.js +490 -5
- package/lib/esm/feature/toolbar/index.js.map +1 -1
- package/lib/esm/feature/top-bar/index.js +1 -0
- package/lib/esm/feature/top-bar/index.js.map +1 -1
- package/lib/esm/index.js +1414 -15
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/llm-providers/anthropic/index.js +145 -0
- package/lib/esm/llm-providers/anthropic/index.js.map +1 -0
- package/lib/esm/llm-providers/openai/index.js +136 -0
- package/lib/esm/llm-providers/openai/index.js.map +1 -0
- package/lib/theme/common/ai.css +446 -0
- package/lib/theme/common/code-mirror.css +14 -0
- package/lib/theme/common/diff.css +177 -0
- package/lib/theme/common/style.css +2 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/feature/ai/ai.spec.d.ts +2 -0
- package/lib/types/feature/ai/ai.spec.d.ts.map +1 -0
- package/lib/types/feature/ai/commands.d.ts +24 -0
- package/lib/types/feature/ai/commands.d.ts.map +1 -0
- package/lib/types/feature/ai/context.d.ts +4 -0
- package/lib/types/feature/ai/context.d.ts.map +1 -0
- package/lib/types/feature/ai/diff-actions/index.d.ts +12 -0
- package/lib/types/feature/ai/diff-actions/index.d.ts.map +1 -0
- package/lib/types/feature/ai/diff-actions/view.d.ts +21 -0
- package/lib/types/feature/ai/diff-actions/view.d.ts.map +1 -0
- package/lib/types/feature/ai/index.d.ts +7 -0
- package/lib/types/feature/ai/index.d.ts.map +1 -0
- package/lib/types/feature/ai/instruction-tooltip/component.d.ts +26 -0
- package/lib/types/feature/ai/instruction-tooltip/component.d.ts.map +1 -0
- package/lib/types/feature/ai/instruction-tooltip/index.d.ts +17 -0
- package/lib/types/feature/ai/instruction-tooltip/index.d.ts.map +1 -0
- package/lib/types/feature/ai/instruction-tooltip/suggestions.d.ts +50 -0
- package/lib/types/feature/ai/instruction-tooltip/suggestions.d.ts.map +1 -0
- package/lib/types/feature/ai/instruction-tooltip/view.d.ts +19 -0
- package/lib/types/feature/ai/instruction-tooltip/view.d.ts.map +1 -0
- package/lib/types/feature/ai/streaming-indicator.d.ts +9 -0
- package/lib/types/feature/ai/streaming-indicator.d.ts.map +1 -0
- package/lib/types/feature/ai/types.d.ts +58 -0
- package/lib/types/feature/ai/types.d.ts.map +1 -0
- package/lib/types/feature/index.d.ts +4 -1
- package/lib/types/feature/index.d.ts.map +1 -1
- package/lib/types/feature/latex/inline-tooltip/inline-tooltip.spec.d.ts +2 -0
- package/lib/types/feature/latex/inline-tooltip/inline-tooltip.spec.d.ts.map +1 -0
- package/lib/types/feature/latex/inline-tooltip/view.d.ts.map +1 -1
- package/lib/types/feature/loader.d.ts.map +1 -1
- package/lib/types/feature/toolbar/config.d.ts.map +1 -1
- package/lib/types/feature/toolbar/index.d.ts +1 -0
- package/lib/types/feature/toolbar/index.d.ts.map +1 -1
- package/lib/types/icons/ai.d.ts +2 -0
- package/lib/types/icons/ai.d.ts.map +1 -0
- package/lib/types/icons/chevron-left.d.ts +2 -0
- package/lib/types/icons/chevron-left.d.ts.map +1 -0
- package/lib/types/icons/chevron-right.d.ts +2 -0
- package/lib/types/icons/chevron-right.d.ts.map +1 -0
- package/lib/types/icons/enter-key.d.ts +2 -0
- package/lib/types/icons/enter-key.d.ts.map +1 -0
- package/lib/types/icons/grammar-check.d.ts +2 -0
- package/lib/types/icons/grammar-check.d.ts.map +1 -0
- package/lib/types/icons/index.d.ts +11 -0
- package/lib/types/icons/index.d.ts.map +1 -1
- package/lib/types/icons/longer.d.ts +2 -0
- package/lib/types/icons/longer.d.ts.map +1 -0
- package/lib/types/icons/retry.d.ts +2 -0
- package/lib/types/icons/retry.d.ts.map +1 -0
- package/lib/types/icons/send-prompt.d.ts +2 -0
- package/lib/types/icons/send-prompt.d.ts.map +1 -0
- package/lib/types/icons/send.d.ts +2 -0
- package/lib/types/icons/send.d.ts.map +1 -0
- package/lib/types/icons/shorter.d.ts +2 -0
- package/lib/types/icons/shorter.d.ts.map +1 -0
- package/lib/types/icons/translate.d.ts +2 -0
- package/lib/types/icons/translate.d.ts.map +1 -0
- package/lib/types/llm-providers/anthropic/index.d.ts +21 -0
- package/lib/types/llm-providers/anthropic/index.d.ts.map +1 -0
- package/lib/types/llm-providers/openai/index.d.ts +15 -0
- package/lib/types/llm-providers/openai/index.d.ts.map +1 -0
- package/lib/types/llm-providers/providers.spec.d.ts +2 -0
- package/lib/types/llm-providers/providers.spec.d.ts.map +1 -0
- package/lib/types/llm-providers/shared.d.ts +16 -0
- package/lib/types/llm-providers/shared.d.ts.map +1 -0
- package/package.json +18 -2
- package/src/feature/ai/ai.spec.ts +742 -0
- package/src/feature/ai/commands.ts +257 -0
- package/src/feature/ai/context.ts +45 -0
- package/src/feature/ai/diff-actions/index.ts +95 -0
- package/src/feature/ai/diff-actions/view.ts +237 -0
- package/src/feature/ai/index.ts +118 -0
- package/src/feature/ai/instruction-tooltip/component.tsx +414 -0
- package/src/feature/ai/instruction-tooltip/index.ts +101 -0
- package/src/feature/ai/instruction-tooltip/suggestions.ts +249 -0
- package/src/feature/ai/instruction-tooltip/view.ts +159 -0
- package/src/feature/ai/streaming-indicator.ts +183 -0
- package/src/feature/ai/types.ts +178 -0
- package/src/feature/index.ts +8 -2
- package/src/feature/latex/inline-tooltip/inline-tooltip.spec.ts +81 -0
- package/src/feature/latex/inline-tooltip/view.ts +2 -0
- package/src/feature/loader.ts +4 -0
- package/src/feature/toolbar/config.ts +27 -1
- package/src/feature/toolbar/index.ts +1 -0
- package/src/icons/ai.ts +14 -0
- package/src/icons/chevron-left.ts +15 -0
- package/src/icons/chevron-right.ts +15 -0
- package/src/icons/enter-key.ts +13 -0
- package/src/icons/grammar-check.ts +13 -0
- package/src/icons/index.ts +11 -0
- package/src/icons/longer.ts +13 -0
- package/src/icons/retry.ts +13 -0
- package/src/icons/send-prompt.ts +13 -0
- package/src/icons/send.ts +13 -0
- package/src/icons/shorter.ts +13 -0
- package/src/icons/translate.ts +13 -0
- package/src/llm-providers/anthropic/index.ts +132 -0
- package/src/llm-providers/openai/index.ts +109 -0
- package/src/llm-providers/providers.spec.ts +472 -0
- package/src/llm-providers/shared.ts +160 -0
- package/src/theme/common/ai.css +430 -0
- package/src/theme/common/code-mirror.css +14 -0
- package/src/theme/common/diff.css +196 -0
- package/src/theme/common/style.css +2 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai.spec.d.ts","sourceRoot":"","sources":["../../../../src/feature/ai/ai.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Ctx } from '@milkdown/kit/ctx';
|
|
2
|
+
import type { MilkdownError } from '@milkdown/kit/exception';
|
|
3
|
+
import type { AIProvider, AIPromptContext, RunAIOptions } from './types';
|
|
4
|
+
export declare const aiProviderConfig: import("@milkdown/utils").$Ctx<{
|
|
5
|
+
provider: AIProvider | undefined;
|
|
6
|
+
buildContext: ((ctx: Ctx, instruction: string) => AIPromptContext) | undefined;
|
|
7
|
+
diffReviewOnEnd: boolean;
|
|
8
|
+
onError: (error: MilkdownError) => void;
|
|
9
|
+
aiIcon: string | undefined;
|
|
10
|
+
}, "aiProviderConfig">;
|
|
11
|
+
export declare const aiSessionCtx: import("@milkdown/utils").$Ctx<{
|
|
12
|
+
abortController: AbortController | null;
|
|
13
|
+
label: string;
|
|
14
|
+
lastInstruction: string;
|
|
15
|
+
lastLabel: string | undefined;
|
|
16
|
+
lastFrom: number;
|
|
17
|
+
lastTo: number;
|
|
18
|
+
diffOwnedByAI: boolean;
|
|
19
|
+
}, "aiSession">;
|
|
20
|
+
export declare const runAICmd: import("@milkdown/utils").$Command<RunAIOptions>;
|
|
21
|
+
export declare const abortAICmd: import("@milkdown/utils").$Command<{
|
|
22
|
+
keep?: boolean;
|
|
23
|
+
}>;
|
|
24
|
+
//# sourceMappingURL=commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../../src/feature/ai/commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAc5D,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAYxE,eAAO,MAAM,gBAAgB;cAEF,UAAU,GAAG,SAAS;kBAEzC,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,KAAK,eAAe,CAAC,GACpD,SAAS;;qBAEI,aAAa;YAGT,MAAM,GAAG,SAAS;sBAG1C,CAAA;AAWD,eAAO,MAAM,YAAY;qBAEI,eAAe,GAAG,IAAI;;;eAGvB,MAAM,GAAG,SAAS;;;;eAM7C,CAAA;AA8FD,eAAO,MAAM,QAAQ,kDA0EnB,CAAA;AAKF,eAAO,MAAM,UAAU;WACM,OAAO;EAoBlC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/feature/ai/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAI5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAK9C,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,MAAM,GAClB,eAAe,CAgCjB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AIDiffActionsConfig } from '../types';
|
|
2
|
+
export declare const DEFAULT_DIFF_ACTIONS_RETRY_LABEL = "Retry";
|
|
3
|
+
export declare const DEFAULT_DIFF_ACTIONS_REJECT_ALL_LABEL = "Reject all";
|
|
4
|
+
export declare const DEFAULT_DIFF_ACTIONS_ACCEPT_ALL_LABEL = "Accept all";
|
|
5
|
+
export declare const DEFAULT_DIFF_ACTIONS_MOD_SYMBOL: string;
|
|
6
|
+
interface DiffActionsPluginOptions {
|
|
7
|
+
config?: AIDiffActionsConfig;
|
|
8
|
+
enterKeyIcon?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function diffActionsPanelPlugin(options?: DiffActionsPluginOptions): import("@milkdown/utils").$Prose;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/feature/ai/diff-actions/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAanD,eAAO,MAAM,gCAAgC,UAAU,CAAA;AACvD,eAAO,MAAM,qCAAqC,eAAe,CAAA;AACjE,eAAO,MAAM,qCAAqC,eAAe,CAAA;AAoBjE,eAAO,MAAM,+BAA+B,QAAoB,CAAA;AAEhE,UAAU,wBAAwB;IAChC,MAAM,CAAC,EAAE,mBAAmB,CAAA;IAI5B,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAoBD,wBAAgB,sBAAsB,CAAC,OAAO,GAAE,wBAA6B,oCA0B5E"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Ctx } from '@milkdown/kit/ctx';
|
|
2
|
+
import type { PluginView } from '@milkdown/kit/prose/state';
|
|
3
|
+
import type { EditorView } from '@milkdown/kit/prose/view';
|
|
4
|
+
export interface ResolvedDiffActionsConfig {
|
|
5
|
+
retryLabel: string;
|
|
6
|
+
rejectAllLabel: string;
|
|
7
|
+
acceptAllLabel: string;
|
|
8
|
+
retryIcon: string;
|
|
9
|
+
rejectIcon: string;
|
|
10
|
+
acceptIcon: string;
|
|
11
|
+
enterKeyIcon: string;
|
|
12
|
+
modSymbol: string;
|
|
13
|
+
}
|
|
14
|
+
export declare class DiffActionsPanelView implements PluginView {
|
|
15
|
+
#private;
|
|
16
|
+
readonly ctx: Ctx;
|
|
17
|
+
constructor(ctx: Ctx, view: EditorView, config: ResolvedDiffActionsConfig);
|
|
18
|
+
update(view: EditorView): void;
|
|
19
|
+
destroy(): void;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../../../src/feature/ai/diff-actions/view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAE5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAyB1D,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,MAAM,CAAA;IAClB,cAAc,EAAE,MAAM,CAAA;IACtB,cAAc,EAAE,MAAM,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;CAClB;AASD,qBAAa,oBAAqB,YAAW,UAAU;;IAuBnD,QAAQ,CAAC,GAAG,EAAE,GAAG;gBAAR,GAAG,EAAE,GAAG,EACjB,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,yBAAyB;IAoHnC,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI;IA8C9B,OAAO,IAAI,IAAI;CAGhB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { DefineFeature } from '../shared';
|
|
2
|
+
import type { AIFeatureConfig } from './types';
|
|
3
|
+
export type { AIDiffActionsConfig, AIFeatureConfig, AIPromptContext, AIProvider, AIStreamingIndicatorConfig, AISubmenuBuilder, AISubmenuDef, AISuggestionItem, AISuggestionsBuilder, } from './types';
|
|
4
|
+
export { runAICmd, abortAICmd } from './commands';
|
|
5
|
+
export { defaultBuildContext } from './context';
|
|
6
|
+
export declare const ai: DefineFeature<AIFeatureConfig>;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/feature/ai/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAwB9C,YAAY,EACV,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,UAAU,EACV,0BAA0B,EAC1B,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAA;AAE/C,eAAO,MAAM,EAAE,EAAE,aAAa,CAAC,eAAe,CAuE7C,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
import type { AISuggestionItem, ResolvedSuggestions } from './suggestions';
|
|
3
|
+
export interface AIInstructionTooltipChrome {
|
|
4
|
+
aiIcon: string;
|
|
5
|
+
sendIcon: string;
|
|
6
|
+
sendPromptIcon: string;
|
|
7
|
+
enterKeyIcon: string;
|
|
8
|
+
chevronLeftIcon: string;
|
|
9
|
+
chevronRightIcon: string;
|
|
10
|
+
suggestionsHeaderLabel: string;
|
|
11
|
+
sendAsPromptHeaderLabel: string;
|
|
12
|
+
sendAsPromptLabel: string;
|
|
13
|
+
submitButtonLabel: string;
|
|
14
|
+
listboxLabel: string;
|
|
15
|
+
}
|
|
16
|
+
type AIInstructionInputProps = {
|
|
17
|
+
placeholder: Ref<string>;
|
|
18
|
+
resetSignal: Ref<number>;
|
|
19
|
+
suggestions: ResolvedSuggestions;
|
|
20
|
+
chrome: AIInstructionTooltipChrome;
|
|
21
|
+
onConfirm: (instruction: string, label?: string) => void;
|
|
22
|
+
onCancel: () => void;
|
|
23
|
+
};
|
|
24
|
+
export declare const AIInstructionInput: import("vue").DefineComponent<AIInstructionInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AIInstructionInputProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
export type { AISuggestionItem };
|
|
26
|
+
//# sourceMappingURL=component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../../src/feature/ai/instruction-tooltip/component.tsx"],"names":[],"mappings":"AACA,OAAO,EAOL,KAAK,GAAG,EACT,MAAM,KAAK,CAAA;AAEZ,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAQ1E,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,MAAM,CAAA;IACpB,eAAe,EAAE,MAAM,CAAA;IACvB,gBAAgB,EAAE,MAAM,CAAA;IACxB,sBAAsB,EAAE,MAAM,CAAA;IAC9B,uBAAuB,EAAE,MAAM,CAAA;IAC/B,iBAAiB,EAAE,MAAM,CAAA;IACzB,iBAAiB,EAAE,MAAM,CAAA;IACzB,YAAY,EAAE,MAAM,CAAA;CACrB;AA2BD,KAAK,uBAAuB,GAAG;IAC7B,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAGxB,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACxB,WAAW,EAAE,mBAAmB,CAAA;IAChC,MAAM,EAAE,0BAA0B,CAAA;IAClC,SAAS,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACxD,QAAQ,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,kBAAkB,0TAsV7B,CAAA;AAEF,YAAY,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Ctx } from '@milkdown/kit/ctx';
|
|
2
|
+
import type { AIFeatureConfig } from '../types';
|
|
3
|
+
export interface AIInstructionTooltipAPI {
|
|
4
|
+
show: (from: number, to: number) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const aiInstructionTooltipAPI: import("@milkdown/utils").$Ctx<{
|
|
7
|
+
show: (from: number, to: number) => void;
|
|
8
|
+
}, "aiInstructionTooltipAPI">;
|
|
9
|
+
export declare const aiInstructionTooltip: import("@milkdown/plugin-tooltip").TooltipPlugin<"CREPE_AI_INSTRUCTION", any>;
|
|
10
|
+
export declare const DEFAULT_SUGGESTIONS_HEADER_LABEL = "SUGGESTIONS";
|
|
11
|
+
export declare const DEFAULT_SEND_AS_PROMPT_HEADER_LABEL = "SEND AS PROMPT";
|
|
12
|
+
export declare const DEFAULT_SEND_AS_PROMPT_LABEL = "Ask AI:";
|
|
13
|
+
export declare const DEFAULT_SUBMIT_BUTTON_LABEL = "Send prompt";
|
|
14
|
+
export declare const DEFAULT_LISTBOX_LABEL = "AI suggestions";
|
|
15
|
+
export declare const DEFAULT_INSTRUCTION_PLACEHOLDER = "Tell AI what to do with the selection\u2026";
|
|
16
|
+
export declare function configureAIInstructionTooltip(config?: AIFeatureConfig): (ctx: Ctx) => void;
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/feature/ai/instruction-tooltip/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAK5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAiB/C,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CACzC;AAMD,eAAO,MAAM,uBAAuB;UAP5B,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI;6BAUzC,CAAA;AAED,eAAO,MAAM,oBAAoB,+EAAyC,CAAA;AAK1E,eAAO,MAAM,gCAAgC,gBAAgB,CAAA;AAC7D,eAAO,MAAM,mCAAmC,mBAAmB,CAAA;AACnE,eAAO,MAAM,4BAA4B,YAAY,CAAA;AACrD,eAAO,MAAM,2BAA2B,gBAAgB,CAAA;AACxD,eAAO,MAAM,qBAAqB,mBAAmB,CAAA;AACrD,eAAO,MAAM,+BAA+B,gDACF,CAAA;AAmC1C,wBAAgB,6BAA6B,CAAC,MAAM,CAAC,EAAE,eAAe,IAC5D,KAAK,GAAG,UAkBjB"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export interface AISuggestionItem {
|
|
2
|
+
icon: string;
|
|
3
|
+
label: string;
|
|
4
|
+
streamingLabel?: string;
|
|
5
|
+
prompt: string;
|
|
6
|
+
}
|
|
7
|
+
export interface AISubmenuDef {
|
|
8
|
+
icon: string;
|
|
9
|
+
label: string;
|
|
10
|
+
title: string;
|
|
11
|
+
searchPlaceholder: string;
|
|
12
|
+
}
|
|
13
|
+
export interface AISubmenuBuilder {
|
|
14
|
+
addItem: (id: string, item: AISuggestionItem) => AISubmenuBuilder;
|
|
15
|
+
removeItem: (id: string) => AISubmenuBuilder;
|
|
16
|
+
getItem: (id: string) => AISuggestionItem | undefined;
|
|
17
|
+
clear: () => AISubmenuBuilder;
|
|
18
|
+
}
|
|
19
|
+
export type ResolvedItemEntry = {
|
|
20
|
+
kind: 'item';
|
|
21
|
+
id: string;
|
|
22
|
+
item: AISuggestionItem;
|
|
23
|
+
};
|
|
24
|
+
export type ResolvedSubmenuEntry = {
|
|
25
|
+
kind: 'submenu';
|
|
26
|
+
id: string;
|
|
27
|
+
def: AISubmenuDef;
|
|
28
|
+
};
|
|
29
|
+
export interface ResolvedSuggestions {
|
|
30
|
+
main: Array<ResolvedItemEntry | ResolvedSubmenuEntry>;
|
|
31
|
+
submenus: Record<string, {
|
|
32
|
+
def: AISubmenuDef;
|
|
33
|
+
items: Array<{
|
|
34
|
+
id: string;
|
|
35
|
+
item: AISuggestionItem;
|
|
36
|
+
}>;
|
|
37
|
+
}>;
|
|
38
|
+
}
|
|
39
|
+
export declare class AISuggestionsBuilder {
|
|
40
|
+
#private;
|
|
41
|
+
addItem: (id: string, item: AISuggestionItem) => this;
|
|
42
|
+
addSubmenu: (id: string, def: AISubmenuDef, build?: (sub: AISubmenuBuilder) => void) => this;
|
|
43
|
+
removeItem: (id: string) => this;
|
|
44
|
+
getItem: (id: string) => AISuggestionItem | undefined;
|
|
45
|
+
getSubmenu: (id: string) => AISubmenuBuilder | undefined;
|
|
46
|
+
clear: () => this;
|
|
47
|
+
build: () => ResolvedSuggestions;
|
|
48
|
+
}
|
|
49
|
+
export declare function applyDefaultSuggestions(builder: AISuggestionsBuilder): void;
|
|
50
|
+
//# sourceMappingURL=suggestions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suggestions.d.ts","sourceRoot":"","sources":["../../../../../src/feature/ai/instruction-tooltip/suggestions.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,MAAM,EAAE,MAAM,CAAA;CACf;AAID,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,EAAE,MAAM,CAAA;CAC1B;AAKD,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,KAAK,gBAAgB,CAAA;IACjE,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,gBAAgB,CAAA;IAC5C,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,gBAAgB,GAAG,SAAS,CAAA;IACrD,KAAK,EAAE,MAAM,gBAAgB,CAAA;CAC9B;AA8BD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,gBAAgB,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,SAAS,CAAA;IACf,EAAE,EAAE,MAAM,CAAA;IACV,GAAG,EAAE,YAAY,CAAA;CAClB,CAAA;AAID,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,KAAK,CAAC,iBAAiB,GAAG,oBAAoB,CAAC,CAAA;IACrD,QAAQ,EAAE,MAAM,CACd,MAAM,EACN;QAAE,GAAG,EAAE,YAAY,CAAC;QAAC,KAAK,EAAE,KAAK,CAAC;YAAE,EAAE,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,gBAAgB,CAAA;SAAE,CAAC,CAAA;KAAE,CAC5E,CAAA;CACF;AAED,qBAAa,oBAAoB;;IAG/B,OAAO,GAAI,IAAI,MAAM,EAAE,MAAM,gBAAgB,UAI5C;IAKD,UAAU,GACR,IAAI,MAAM,EACV,KAAK,YAAY,EACjB,QAAQ,CAAC,GAAG,EAAE,gBAAgB,KAAK,IAAI,UAOxC;IAED,UAAU,GAAI,IAAI,MAAM,UAGvB;IAED,OAAO,GAAI,IAAI,MAAM,kCAGpB;IAKD,UAAU,GAAI,IAAI,MAAM,kCAKvB;IAED,KAAK,aAGJ;IAED,KAAK,QAAO,mBAAmB,CAkB9B;CAKF;AAKD,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,oBAAoB,GAAG,IAAI,CAoF3E"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Ctx } from '@milkdown/kit/ctx';
|
|
2
|
+
import type { EditorState, PluginView } from '@milkdown/kit/prose/state';
|
|
3
|
+
import type { EditorView } from '@milkdown/kit/prose/view';
|
|
4
|
+
import type { ResolvedSuggestions } from './suggestions';
|
|
5
|
+
import { type AIInstructionTooltipChrome } from './component';
|
|
6
|
+
export interface AIInstructionTooltipViewConfig {
|
|
7
|
+
placeholder: string;
|
|
8
|
+
chrome: AIInstructionTooltipChrome;
|
|
9
|
+
suggestions: ResolvedSuggestions;
|
|
10
|
+
}
|
|
11
|
+
export declare class AIInstructionTooltipView implements PluginView {
|
|
12
|
+
#private;
|
|
13
|
+
readonly ctx: Ctx;
|
|
14
|
+
constructor(ctx: Ctx, view: EditorView, config: AIInstructionTooltipViewConfig);
|
|
15
|
+
show: (from: number, to: number) => void;
|
|
16
|
+
update: (view: EditorView, prevState?: EditorState) => void;
|
|
17
|
+
destroy: () => void;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../../../src/feature/ai/instruction-tooltip/view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAQ1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAGxD,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,aAAa,CAAA;AAEpB,MAAM,WAAW,8BAA8B;IAC7C,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,0BAA0B,CAAA;IAClC,WAAW,EAAE,mBAAmB,CAAA;CACjC;AAED,qBAAa,wBAAyB,YAAW,UAAU;;IAgBvD,QAAQ,CAAC,GAAG,EAAE,GAAG;gBAAR,GAAG,EAAE,GAAG,EACjB,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,8BAA8B;IA4ExC,IAAI,GAAI,MAAM,MAAM,EAAE,IAAI,MAAM,UAa/B;IAED,MAAM,GAAI,MAAM,UAAU,EAAE,YAAY,WAAW,UAkBlD;IAED,OAAO,aAIN;CACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AIStreamingIndicatorConfig } from './types';
|
|
2
|
+
export declare const DEFAULT_STREAMING_FALLBACK_LABEL = "Generating";
|
|
3
|
+
export declare const DEFAULT_STREAMING_CANCEL_HINT = "Esc to cancel";
|
|
4
|
+
interface StreamingIndicatorPluginOptions {
|
|
5
|
+
config?: AIStreamingIndicatorConfig;
|
|
6
|
+
}
|
|
7
|
+
export declare function streamingIndicatorPlugin(options?: StreamingIndicatorPluginOptions): import("@milkdown/utils").$Prose;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=streaming-indicator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streaming-indicator.d.ts","sourceRoot":"","sources":["../../../../src/feature/ai/streaming-indicator.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAA;AAOzD,eAAO,MAAM,gCAAgC,eAAe,CAAA;AAC5D,eAAO,MAAM,6BAA6B,kBAAkB,CAAA;AA2E5D,UAAU,+BAA+B;IACvC,MAAM,CAAC,EAAE,0BAA0B,CAAA;CACpC;AAED,wBAAgB,wBAAwB,CACtC,OAAO,GAAE,+BAAoC,oCAkF9C"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { Ctx } from '@milkdown/kit/ctx';
|
|
2
|
+
import type { MilkdownError } from '@milkdown/kit/exception';
|
|
3
|
+
import type { StreamingConfig } from '@milkdown/kit/plugin/streaming';
|
|
4
|
+
import type { AISuggestionsBuilder } from './instruction-tooltip/suggestions';
|
|
5
|
+
export type { AISubmenuBuilder, AISubmenuDef, AISuggestionItem, AISuggestionsBuilder, } from './instruction-tooltip/suggestions';
|
|
6
|
+
export interface AIPromptContext {
|
|
7
|
+
document: string;
|
|
8
|
+
selection: string;
|
|
9
|
+
instruction: string;
|
|
10
|
+
}
|
|
11
|
+
export type AIProvider = (context: AIPromptContext, signal: AbortSignal) => AsyncIterable<string>;
|
|
12
|
+
export interface AIDiffConfig {
|
|
13
|
+
acceptLabel?: string;
|
|
14
|
+
rejectLabel?: string;
|
|
15
|
+
customBlockTypes?: string[];
|
|
16
|
+
ignoreAttrs?: Record<string, string[]>;
|
|
17
|
+
}
|
|
18
|
+
export interface AIStreamingIndicatorConfig {
|
|
19
|
+
fallbackLabel?: string;
|
|
20
|
+
cancelHint?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface AIDiffActionsConfig {
|
|
23
|
+
retryLabel?: string;
|
|
24
|
+
rejectAllLabel?: string;
|
|
25
|
+
acceptAllLabel?: string;
|
|
26
|
+
retryIcon?: string;
|
|
27
|
+
rejectIcon?: string;
|
|
28
|
+
acceptIcon?: string;
|
|
29
|
+
modSymbol?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface AIFeatureConfig {
|
|
32
|
+
provider?: AIProvider;
|
|
33
|
+
buildContext?: (ctx: Ctx, instruction: string) => AIPromptContext;
|
|
34
|
+
diffReviewOnEnd?: boolean;
|
|
35
|
+
diff?: AIDiffConfig;
|
|
36
|
+
streaming?: Partial<Omit<StreamingConfig, 'diffReviewOnEnd'>>;
|
|
37
|
+
onError?: (error: MilkdownError) => void;
|
|
38
|
+
aiIcon?: string;
|
|
39
|
+
instructionPlaceholder?: string;
|
|
40
|
+
suggestionsHeaderLabel?: string;
|
|
41
|
+
sendAsPromptHeaderLabel?: string;
|
|
42
|
+
sendAsPromptLabel?: string;
|
|
43
|
+
submitButtonLabel?: string;
|
|
44
|
+
listboxLabel?: string;
|
|
45
|
+
sendIcon?: string;
|
|
46
|
+
sendPromptIcon?: string;
|
|
47
|
+
enterKeyIcon?: string;
|
|
48
|
+
chevronLeftIcon?: string;
|
|
49
|
+
chevronRightIcon?: string;
|
|
50
|
+
buildAISuggestions?: (builder: AISuggestionsBuilder) => void;
|
|
51
|
+
streamingIndicator?: AIStreamingIndicatorConfig;
|
|
52
|
+
diffActions?: AIDiffActionsConfig;
|
|
53
|
+
}
|
|
54
|
+
export interface RunAIOptions {
|
|
55
|
+
instruction: string;
|
|
56
|
+
label?: string;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/feature/ai/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAErE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAA;AAE7E,YAAY,EACV,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,mCAAmC,CAAA;AAE1C,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;CACpB;AAKD,MAAM,MAAM,UAAU,GAAG,CACvB,OAAO,EAAE,eAAe,EACxB,MAAM,EAAE,WAAW,KAChB,aAAa,CAAC,MAAM,CAAC,CAAA;AAG1B,MAAM,WAAW,YAAY;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;CACvC;AAGD,MAAM,WAAW,0BAA0B;IAIzC,aAAa,CAAC,EAAE,MAAM,CAAA;IAItB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAOD,MAAM,WAAW,mBAAmB;IAElC,UAAU,CAAC,EAAE,MAAM,CAAA;IAGnB,cAAc,CAAC,EAAE,MAAM,CAAA;IAGvB,cAAc,CAAC,EAAE,MAAM,CAAA;IAGvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAGlB,UAAU,CAAC,EAAE,MAAM,CAAA;IAGnB,UAAU,CAAC,EAAE,MAAM,CAAA;IAKnB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAGD,MAAM,WAAW,eAAe;IAK9B,QAAQ,CAAC,EAAE,UAAU,CAAA;IAIrB,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,KAAK,eAAe,CAAA;IAGjE,eAAe,CAAC,EAAE,OAAO,CAAA;IAGzB,IAAI,CAAC,EAAE,YAAY,CAAA;IAMnB,SAAS,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,iBAAiB,CAAC,CAAC,CAAA;IAK7D,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;IAKxC,MAAM,CAAC,EAAE,MAAM,CAAA;IAIf,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAI/B,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAI/B,uBAAuB,CAAC,EAAE,MAAM,CAAA;IAIhC,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAM1B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAK1B,YAAY,CAAC,EAAE,MAAM,CAAA;IAIrB,QAAQ,CAAC,EAAE,MAAM,CAAA;IAGjB,cAAc,CAAC,EAAE,MAAM,CAAA;IAIvB,YAAY,CAAC,EAAE,MAAM,CAAA;IAGrB,eAAe,CAAC,EAAE,MAAM,CAAA;IAGxB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAKzB,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,IAAI,CAAA;IAG5D,kBAAkB,CAAC,EAAE,0BAA0B,CAAA;IAI/C,WAAW,CAAC,EAAE,mBAAmB,CAAA;CAClC;AAGD,MAAM,WAAW,YAAY;IAE3B,WAAW,EAAE,MAAM,CAAA;IAKnB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AIFeatureConfig } from './ai';
|
|
1
2
|
import type { BlockEditFeatureConfig } from './block-edit';
|
|
2
3
|
import type { CodeMirrorFeatureConfig } from './code-mirror';
|
|
3
4
|
import type { CursorFeatureConfig } from './cursor';
|
|
@@ -20,7 +21,8 @@ export declare enum CrepeFeature {
|
|
|
20
21
|
Placeholder = "placeholder",
|
|
21
22
|
Table = "table",
|
|
22
23
|
Latex = "latex",
|
|
23
|
-
TopBar = "top-bar"
|
|
24
|
+
TopBar = "top-bar",
|
|
25
|
+
AI = "ai"
|
|
24
26
|
}
|
|
25
27
|
export interface CrepeFeatureConfig {
|
|
26
28
|
[CrepeFeature.Cursor]?: CursorFeatureConfig;
|
|
@@ -34,6 +36,7 @@ export interface CrepeFeatureConfig {
|
|
|
34
36
|
[CrepeFeature.Table]?: TableFeatureConfig;
|
|
35
37
|
[CrepeFeature.Latex]?: LatexFeatureConfig;
|
|
36
38
|
[CrepeFeature.TopBar]?: TopBarFeatureConfig;
|
|
39
|
+
[CrepeFeature.AI]?: AIFeatureConfig;
|
|
37
40
|
}
|
|
38
41
|
export declare const defaultFeatures: Record<CrepeFeature, boolean>;
|
|
39
42
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feature/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAA;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AACnD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAA;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AACjD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAA;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AACjD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAA;AAKpD,oBAAY,YAAY;IAEtB,UAAU,gBAAgB;IAG1B,QAAQ,cAAc;IAGtB,WAAW,iBAAiB;IAG5B,MAAM,WAAW;IAGjB,UAAU,gBAAgB;IAG1B,SAAS,eAAe;IAGxB,OAAO,YAAY;IAGnB,WAAW,gBAAgB;IAG3B,KAAK,UAAU;IAGf,KAAK,UAAU;IAGf,MAAM,YAAY;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feature/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,MAAM,CAAA;AAC3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAA;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AACnD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAA;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AACjD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAA;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AACjD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAA;AAKpD,oBAAY,YAAY;IAEtB,UAAU,gBAAgB;IAG1B,QAAQ,cAAc;IAGtB,WAAW,iBAAiB;IAG5B,MAAM,WAAW;IAGjB,UAAU,gBAAgB;IAG1B,SAAS,eAAe;IAGxB,OAAO,YAAY;IAGnB,WAAW,gBAAgB;IAG3B,KAAK,UAAU;IAGf,KAAK,UAAU;IAGf,MAAM,YAAY;IAGlB,EAAE,OAAO;CACV;AAED,MAAM,WAAW,kBAAkB;IACjC,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,EAAE,mBAAmB,CAAA;IAC3C,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,EAAE,qBAAqB,CAAA;IAC/C,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,EAAE,wBAAwB,CAAA;IACrD,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,EAAE,uBAAuB,CAAA;IACnD,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,EAAE,sBAAsB,CAAA;IACjD,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,EAAE,wBAAwB,CAAA;IACrD,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,EAAE,oBAAoB,CAAA;IAC7C,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,EAAE,uBAAuB,CAAA;IACnD,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,kBAAkB,CAAA;IACzC,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,kBAAkB,CAAA;IACzC,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,EAAE,mBAAmB,CAAA;IAC3C,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,eAAe,CAAA;CACpC;AAED,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,YAAY,EAAE,OAAO,CAazD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-tooltip.spec.d.ts","sourceRoot":"","sources":["../../../../../src/feature/latex/inline-tooltip/inline-tooltip.spec.ts"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../../../src/feature/latex/inline-tooltip/view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAM3D,OAAO,EAAE,WAAW,EAAiB,MAAM,2BAA2B,CAAA;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAGrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,IAAI,CAAA;AAKrC,qBAAa,kBAAmB,YAAW,UAAU;;IASjD,QAAQ,CAAC,GAAG,EAAE,GAAG;gBAAR,GAAG,EAAE,GAAG,EACjB,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../../../src/feature/latex/inline-tooltip/view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAM3D,OAAO,EAAE,WAAW,EAAiB,MAAM,2BAA2B,CAAA;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAGrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,IAAI,CAAA;AAKrC,qBAAa,kBAAmB,YAAW,UAAU;;IASjD,QAAQ,CAAC,GAAG,EAAE,GAAG;gBAAR,GAAG,EAAE,GAAG,EACjB,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC;IAoG9B,MAAM,GAAI,MAAM,UAAU,EAAE,YAAY,WAAW,UAElD;IAED,OAAO,aAIN;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../src/feature/loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../src/feature/loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAOhD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAStC,wBAAgB,WAAW,CACzB,OAAO,EAAE,YAAY,EACrB,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,KAAK,QAwCf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/feature/toolbar/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAoB5C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,GAAG,CAAA;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/feature/toolbar/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAoB5C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,GAAG,CAAA;AAmB7C,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,OAAO,CAAA;IAC7B,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,wBAAgB,SAAS,CAAC,MAAM,CAAC,EAAE,oBAAoB,EAAE,GAAG,CAAC,EAAE,GAAG;;;;;;;;IAqHjE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/feature/toolbar/index.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAM3C,UAAU,aAAa;IACrB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,iBAAiB,EAAE,MAAM,CAAA;IACzB,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,CAAC,OAAO,EAAE,YAAY,CAAC,WAAW,CAAC,KAAK,IAAI,CAAA;CAC3D;AAED,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC,aAAa,CAAC,CAAA;AAqFzD,eAAO,MAAM,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAYvD,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/feature/toolbar/index.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAM3C,UAAU,aAAa;IACrB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,iBAAiB,EAAE,MAAM,CAAA;IACzB,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,EAAE,CAAC,OAAO,EAAE,YAAY,CAAC,WAAW,CAAC,KAAK,IAAI,CAAA;CAC3D;AAED,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC,aAAa,CAAC,CAAA;AAqFzD,eAAO,MAAM,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAYvD,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const aiIcon = "\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n >\n <path\n fill=\"currentColor\"\n d=\"M19 9l1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25zm0 14l1.25-2.75L23 19l-2.75-1.25L19 15l-1.25 2.75L15 19l2.75 1.25zM9 20l3-6.5L18 10l-6-3.5L9 0L6 6.5L0 10l6 3.5z\"\n transform=\"translate(3 3) scale(0.75)\"\n />\n </svg>\n";
|
|
2
|
+
//# sourceMappingURL=ai.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../../../src/icons/ai.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,qaAalB,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const chevronLeftIcon = "\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M15.75 19.5L8.25 12l7.5-7.5\"\n />\n </svg>\n";
|
|
2
|
+
//# sourceMappingURL=chevron-left.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chevron-left.d.ts","sourceRoot":"","sources":["../../../src/icons/chevron-left.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,0SAc3B,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const chevronRightIcon = "\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M8.25 4.5l7.5 7.5-7.5 7.5\"\n />\n </svg>\n";
|
|
2
|
+
//# sourceMappingURL=chevron-right.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chevron-right.d.ts","sourceRoot":"","sources":["../../../src/icons/chevron-right.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,wSAc5B,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const enterKeyIcon = "\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n >\n <path\n fill=\"currentColor\"\n d=\"M9 16l-5-5l5-5l1.4 1.4L7.825 10H18V6h2v6H7.825l2.575 2.6z\"\n />\n </svg>\n";
|
|
2
|
+
//# sourceMappingURL=enter-key.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enter-key.d.ts","sourceRoot":"","sources":["../../../src/icons/enter-key.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,+PAYxB,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const grammarCheckIcon = "\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n >\n <path\n fill=\"currentColor\"\n d=\"M9.55 17.575L4.225 12.25l1.4-1.425L9.55 14.75l8.825-8.825l1.4 1.425z\"\n />\n </svg>\n";
|
|
2
|
+
//# sourceMappingURL=grammar-check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grammar-check.d.ts","sourceRoot":"","sources":["../../../src/icons/grammar-check.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,0QAY5B,CAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './ai';
|
|
1
2
|
export * from './align-center';
|
|
2
3
|
export * from './align-left';
|
|
3
4
|
export * from './align-right';
|
|
@@ -8,6 +9,8 @@ export * from './caption';
|
|
|
8
9
|
export * from './check-box-checked';
|
|
9
10
|
export * from './check-box-unchecked';
|
|
10
11
|
export * from './chevron-down';
|
|
12
|
+
export * from './chevron-left';
|
|
13
|
+
export * from './chevron-right';
|
|
11
14
|
export * from './clear';
|
|
12
15
|
export * from './code';
|
|
13
16
|
export * from './code-block';
|
|
@@ -16,6 +19,8 @@ export * from './copy';
|
|
|
16
19
|
export * from './divider';
|
|
17
20
|
export * from './drag-handle';
|
|
18
21
|
export * from './edit';
|
|
22
|
+
export * from './enter-key';
|
|
23
|
+
export * from './grammar-check';
|
|
19
24
|
export * from './h1';
|
|
20
25
|
export * from './h2';
|
|
21
26
|
export * from './h3';
|
|
@@ -25,16 +30,22 @@ export * from './h6';
|
|
|
25
30
|
export * from './image';
|
|
26
31
|
export * from './italic';
|
|
27
32
|
export * from './link';
|
|
33
|
+
export * from './longer';
|
|
28
34
|
export * from './menu';
|
|
29
35
|
export * from './ordered-list';
|
|
30
36
|
export * from './plus';
|
|
31
37
|
export * from './quote';
|
|
32
38
|
export * from './remove';
|
|
39
|
+
export * from './retry';
|
|
33
40
|
export * from './search';
|
|
41
|
+
export * from './send';
|
|
42
|
+
export * from './send-prompt';
|
|
43
|
+
export * from './shorter';
|
|
34
44
|
export * from './strikethrough';
|
|
35
45
|
export * from './table';
|
|
36
46
|
export * from './text';
|
|
37
47
|
export * from './todo-list';
|
|
48
|
+
export * from './translate';
|
|
38
49
|
export * from './functions';
|
|
39
50
|
export * from './visibility-off';
|
|
40
51
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/icons/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,QAAQ,CAAA;AACtB,cAAc,MAAM,CAAA;AACpB,cAAc,MAAM,CAAA;AACpB,cAAc,MAAM,CAAA;AACpB,cAAc,MAAM,CAAA;AACpB,cAAc,MAAM,CAAA;AACpB,cAAc,MAAM,CAAA;AACpB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,QAAQ,CAAA;AACtB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/icons/index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAA;AACpB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,QAAQ,CAAA;AACtB,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,MAAM,CAAA;AACpB,cAAc,MAAM,CAAA;AACpB,cAAc,MAAM,CAAA;AACpB,cAAc,MAAM,CAAA;AACpB,cAAc,MAAM,CAAA;AACpB,cAAc,MAAM,CAAA;AACpB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const longerIcon = "\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n >\n <path\n fill=\"currentColor\"\n d=\"M3 18v-2h13v2zm0-5v-2h18v2zm0-5V6h18v2zm15 13v-3h-3v-2h3v-3h2v3h3v2h-3v3z\"\n />\n </svg>\n";
|
|
2
|
+
//# sourceMappingURL=longer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"longer.d.ts","sourceRoot":"","sources":["../../../src/icons/longer.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,+QAYtB,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const retryIcon = "\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n >\n <path\n fill=\"currentColor\"\n d=\"M12 20q-3.35 0-5.675-2.325T4 12q0-3.35 2.325-5.675T12 4q1.725 0 3.3.713T18 6.75V4h2v7h-7V9h4.2q-.8-1.4-2.187-2.2T12 6Q9.5 6 7.75 7.75T6 12q0 2.5 1.75 4.25T12 18q1.925 0 3.475-1.1T17.65 14h2.1q-.7 2.65-2.85 4.325T12 20\"\n />\n </svg>\n";
|
|
2
|
+
//# sourceMappingURL=retry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../../../src/icons/retry.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,+ZAYrB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-prompt.d.ts","sourceRoot":"","sources":["../../../src/icons/send-prompt.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,+NAY1B,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const sendIcon = "\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n >\n <path\n fill=\"currentColor\"\n d=\"M11 20V7.825l-5.6 5.6L4 12l8-8l8 8l-1.4 1.425l-5.6-5.6V20z\"\n />\n </svg>\n";
|
|
2
|
+
//# sourceMappingURL=send.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../../src/icons/send.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,gQAYpB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shorter.d.ts","sourceRoot":"","sources":["../../../src/icons/shorter.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,oNAYvB,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const translateIcon = "\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n >\n <path\n fill=\"currentColor\"\n d=\"m12.9 16l-2.55-2.5l.05-.05q1.45-1.6 2.262-3.117T13.95 7H16V5h-6V3H8v2H2v2h9.1q-.5 1.2-1.225 2.387T8 11.7q-.6-.6-1.187-1.412T5.85 8.6H3.85q.5 1.4 1.3 2.7T6.95 13.7L2.85 17.75L4.25 19.15L8 15.4L10.55 17.95zM18.5 22h-2L21 10h2l4.5 12h-2l-1.05-3h-4.9zm1.6-5h3.6l-1.8-5.1z\"\n />\n </svg>\n";
|
|
2
|
+
//# sourceMappingURL=translate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"translate.d.ts","sourceRoot":"","sources":["../../../src/icons/translate.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,idAYzB,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { AIPromptContext, AIProvider } from '../../feature/ai/types';
|
|
2
|
+
import { type BaseProviderConfig } from '../shared';
|
|
3
|
+
export interface AnthropicMessage {
|
|
4
|
+
role: 'user' | 'assistant';
|
|
5
|
+
content: string;
|
|
6
|
+
}
|
|
7
|
+
export interface AnthropicBuildMessagesResult {
|
|
8
|
+
system?: string;
|
|
9
|
+
messages: AnthropicMessage[];
|
|
10
|
+
}
|
|
11
|
+
export interface AnthropicProviderConfig extends BaseProviderConfig {
|
|
12
|
+
maxTokens?: number;
|
|
13
|
+
anthropicVersion?: string;
|
|
14
|
+
buildMessages?: (context: AIPromptContext, defaults: {
|
|
15
|
+
systemPrompt: string | null;
|
|
16
|
+
userMessage: string;
|
|
17
|
+
}) => AnthropicBuildMessagesResult;
|
|
18
|
+
body?: Record<string, unknown>;
|
|
19
|
+
}
|
|
20
|
+
export declare function createAnthropicProvider(config: AnthropicProviderConfig): AIProvider;
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/llm-providers/anthropic/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAEzE,OAAO,EACL,KAAK,kBAAkB,EAMxB,MAAM,WAAW,CAAA;AAOlB,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,GAAG,WAAW,CAAA;IAC1B,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,4BAA4B;IAG3C,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,gBAAgB,EAAE,CAAA;CAC7B;AAED,MAAM,WAAW,uBAAwB,SAAQ,kBAAkB;IAEjE,SAAS,CAAC,EAAE,MAAM,CAAA;IAGlB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAKzB,aAAa,CAAC,EAAE,CACd,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE;QAAE,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,KAC3D,4BAA4B,CAAA;IAIjC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC/B;AAaD,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,uBAAuB,GAC9B,UAAU,CAsEZ"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AIPromptContext, AIProvider } from '../../feature/ai/types';
|
|
2
|
+
import { type BaseProviderConfig } from '../shared';
|
|
3
|
+
export interface OpenAIChatMessage {
|
|
4
|
+
role: 'system' | 'user' | 'assistant';
|
|
5
|
+
content: string;
|
|
6
|
+
}
|
|
7
|
+
export interface OpenAIProviderConfig extends BaseProviderConfig {
|
|
8
|
+
buildMessages?: (context: AIPromptContext, defaults: {
|
|
9
|
+
systemPrompt: string | null;
|
|
10
|
+
userMessage: string;
|
|
11
|
+
}) => OpenAIChatMessage[];
|
|
12
|
+
body?: Record<string, unknown>;
|
|
13
|
+
}
|
|
14
|
+
export declare function createOpenAIProvider(config: OpenAIProviderConfig): AIProvider;
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/llm-providers/openai/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAEzE,OAAO,EACL,KAAK,kBAAkB,EAMxB,MAAM,WAAW,CAAA;AAKlB,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAA;IACrC,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,oBAAqB,SAAQ,kBAAkB;IAM9D,aAAa,CAAC,EAAE,CACd,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE;QAAE,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,KAC3D,iBAAiB,EAAE,CAAA;IAIxB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC/B;AAYD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,oBAAoB,GAAG,UAAU,CAkD7E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"providers.spec.d.ts","sourceRoot":"","sources":["../../../src/llm-providers/providers.spec.ts"],"names":[],"mappings":""}
|