@spotpatch/vite 1.3.1 → 1.4.1

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/dist/index.d.ts CHANGED
@@ -1,70 +1,10 @@
1
1
  import { Plugin } from 'vite';
2
- import { SpotPatchEditorPreference, ContextBudget, SpotPatchLocalePreference, ResolvedAiOptions, AiProviderProtocol, AiProviderAuthentication, AiExecutionOptions, AiOptions } from '@spotpatch/shared';
2
+ import { SpotPatchOptions } from '@spotpatch/dev-server';
3
+ export { DEFAULT_OPTIONS, ResolvedSpotPatchOptions, SimpleAiOptions, SpotPatchAiOptions, SpotPatchOptions, resolveOptions } from '@spotpatch/dev-server';
3
4
  export { AgentApplyMode, AgentCheckDefinition, AgentLimits, AiExecutionOptions, AiModelProfile, AiOptions, AiProviderAuthentication, AiProviderProtocol, ContextBudget, DEFAULT_AGENT_LIMITS, OpenAICompatibleProviderOptions, SpotPatchEditorPreference } from '@spotpatch/shared';
4
5
 
5
- type FilterEntry = string | RegExp;
6
- interface SimpleAiOptions {
7
- readonly baseURL: string;
8
- readonly model: string;
9
- readonly apiKeyEnv?: string;
10
- readonly protocol?: AiProviderProtocol;
11
- readonly authentication?: AiProviderAuthentication;
12
- readonly providerLabel?: string;
13
- readonly modelLabel?: string;
14
- readonly execution?: AiExecutionOptions;
15
- }
16
- type SpotPatchAiOptions = false | SimpleAiOptions | AiOptions;
17
- interface SpotPatchOptions {
18
- readonly enabled?: boolean;
19
- readonly include?: readonly FilterEntry[];
20
- readonly exclude?: readonly FilterEntry[];
21
- readonly editor?: SpotPatchEditorPreference;
22
- readonly redact?: boolean;
23
- readonly budget?: Partial<ContextBudget>;
24
- readonly shortcut?: string;
25
- readonly allowLan?: boolean;
26
- readonly debug?: boolean;
27
- readonly locale?: SpotPatchLocalePreference;
28
- readonly maxTargets?: number;
29
- readonly ai?: SpotPatchAiOptions;
30
- }
31
- interface ResolvedSpotPatchOptions {
32
- readonly enabled: boolean;
33
- readonly include: readonly FilterEntry[];
34
- readonly exclude: readonly FilterEntry[];
35
- readonly editor: SpotPatchEditorPreference;
36
- readonly redact: boolean;
37
- readonly budget: Readonly<ContextBudget>;
38
- readonly shortcut: string;
39
- readonly allowLan: boolean;
40
- readonly debug: boolean;
41
- readonly locale: SpotPatchLocalePreference;
42
- readonly maxTargets: number;
43
- readonly ai: false | ResolvedAiOptions;
44
- }
45
- declare const DEFAULT_OPTIONS: Readonly<{
46
- enabled: true;
47
- include: readonly RegExp[];
48
- exclude: readonly RegExp[];
49
- editor: "auto";
50
- redact: true;
51
- budget: Readonly<{
52
- totalCharacters: number;
53
- domCharacters: number;
54
- cssCharacters: number;
55
- codeCharacters: number;
56
- maxCodeLines: number;
57
- maxComponentDepth: number;
58
- }>;
59
- shortcut: string;
60
- allowLan: false;
61
- debug: false;
62
- locale: "auto";
63
- maxTargets: number;
64
- ai: false;
65
- }>;
66
- declare function resolveOptions(options?: SpotPatchOptions, environmentAi?: false | SimpleAiOptions): ResolvedSpotPatchOptions;
6
+ type ViteSpotPatchOptions = SpotPatchOptions;
67
7
 
68
- declare function spotPatch(userOptions?: SpotPatchOptions): Plugin[];
8
+ declare function spotPatch(userOptions?: ViteSpotPatchOptions): Plugin[];
69
9
 
70
- export { DEFAULT_OPTIONS, type ResolvedSpotPatchOptions, type SimpleAiOptions, type SpotPatchAiOptions, type SpotPatchOptions, resolveOptions, spotPatch };
10
+ export { type ViteSpotPatchOptions, spotPatch };