@adecore/intelligent-ui 0.54.9 → 0.54.11
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/links.d.ts +8 -8
- package/dist/links.js +5 -4
- package/package.json +1 -1
- package/src/links.ts +5 -4
package/dist/links.d.ts
CHANGED
|
@@ -5,16 +5,16 @@ export declare const UiLinkTargetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
5
5
|
type: z.ZodLiteral<"File">;
|
|
6
6
|
path: z.ZodString;
|
|
7
7
|
line: z.ZodOptional<z.ZodNumber>;
|
|
8
|
-
}, z.core.$
|
|
8
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
9
9
|
type: z.ZodLiteral<"Diff">;
|
|
10
10
|
path: z.ZodString;
|
|
11
|
-
}, z.core.$
|
|
11
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
12
12
|
type: z.ZodLiteral<"Commit">;
|
|
13
13
|
sha: z.ZodString;
|
|
14
|
-
}, z.core.$
|
|
14
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
15
15
|
type: z.ZodLiteral<"Node">;
|
|
16
16
|
id: z.ZodString;
|
|
17
|
-
}, z.core.$
|
|
17
|
+
}, z.core.$strip>], "type">;
|
|
18
18
|
export type UiLinkTarget = z.infer<typeof UiLinkTargetSchema>;
|
|
19
19
|
export declare const UiLinkResolutionSchema: z.ZodObject<{
|
|
20
20
|
state: z.ZodEnum<{
|
|
@@ -25,16 +25,16 @@ export declare const UiLinkResolutionSchema: z.ZodObject<{
|
|
|
25
25
|
type: z.ZodLiteral<"File">;
|
|
26
26
|
path: z.ZodString;
|
|
27
27
|
line: z.ZodOptional<z.ZodNumber>;
|
|
28
|
-
}, z.core.$
|
|
28
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
29
29
|
type: z.ZodLiteral<"Diff">;
|
|
30
30
|
path: z.ZodString;
|
|
31
|
-
}, z.core.$
|
|
31
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
32
32
|
type: z.ZodLiteral<"Commit">;
|
|
33
33
|
sha: z.ZodString;
|
|
34
|
-
}, z.core.$
|
|
34
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
35
35
|
type: z.ZodLiteral<"Node">;
|
|
36
36
|
id: z.ZodString;
|
|
37
|
-
}, z.core.$
|
|
37
|
+
}, z.core.$strip>], "type">>;
|
|
38
38
|
cwd: z.ZodOptional<z.ZodString>;
|
|
39
39
|
viewId: z.ZodOptional<z.ZodString>;
|
|
40
40
|
projectId: z.ZodOptional<z.ZodString>;
|
package/dist/links.js
CHANGED
|
@@ -2,11 +2,12 @@ import { z } from 'zod';
|
|
|
2
2
|
import { eachDrawnNode } from './inputs.js';
|
|
3
3
|
import { uiValidatedState } from './query.js';
|
|
4
4
|
import { evaluateUiBlock } from './runtime.js';
|
|
5
|
+
// Open objects: native clients validate a chat whole, so a closed target would fail them on any new optional field.
|
|
5
6
|
export const UiLinkTargetSchema = z.discriminatedUnion('type', [
|
|
6
|
-
z.object({ type: z.literal('File'), path: z.string().min(1).max(4096), line: z.number().int().positive().optional() })
|
|
7
|
-
z.object({ type: z.literal('Diff'), path: z.string().min(1).max(4096) })
|
|
8
|
-
z.object({ type: z.literal('Commit'), sha: z.string().regex(/^[a-f\d]{7,64}$/i) })
|
|
9
|
-
z.object({ type: z.literal('Node'), id: z.string().min(1).max(256) })
|
|
7
|
+
z.object({ type: z.literal('File'), path: z.string().min(1).max(4096), line: z.number().int().positive().optional() }),
|
|
8
|
+
z.object({ type: z.literal('Diff'), path: z.string().min(1).max(4096) }),
|
|
9
|
+
z.object({ type: z.literal('Commit'), sha: z.string().regex(/^[a-f\d]{7,64}$/i) }),
|
|
10
|
+
z.object({ type: z.literal('Node'), id: z.string().min(1).max(256) })
|
|
10
11
|
]);
|
|
11
12
|
// `state` is a frozen set. Native clients validate these payloads whole, so a new state would fail them.
|
|
12
13
|
export const UiLinkResolutionSchema = z.object({
|
package/package.json
CHANGED
package/src/links.ts
CHANGED
|
@@ -5,11 +5,12 @@ import { eachDrawnNode } from './inputs.ts';
|
|
|
5
5
|
import { uiValidatedState } from './query.ts';
|
|
6
6
|
import { evaluateUiBlock } from './runtime.ts';
|
|
7
7
|
|
|
8
|
+
// Open objects: native clients validate a chat whole, so a closed target would fail them on any new optional field.
|
|
8
9
|
export const UiLinkTargetSchema = z.discriminatedUnion('type', [
|
|
9
|
-
z.object({ type: z.literal('File'), path: z.string().min(1).max(4096), line: z.number().int().positive().optional() })
|
|
10
|
-
z.object({ type: z.literal('Diff'), path: z.string().min(1).max(4096) })
|
|
11
|
-
z.object({ type: z.literal('Commit'), sha: z.string().regex(/^[a-f\d]{7,64}$/i) })
|
|
12
|
-
z.object({ type: z.literal('Node'), id: z.string().min(1).max(256) })
|
|
10
|
+
z.object({ type: z.literal('File'), path: z.string().min(1).max(4096), line: z.number().int().positive().optional() }),
|
|
11
|
+
z.object({ type: z.literal('Diff'), path: z.string().min(1).max(4096) }),
|
|
12
|
+
z.object({ type: z.literal('Commit'), sha: z.string().regex(/^[a-f\d]{7,64}$/i) }),
|
|
13
|
+
z.object({ type: z.literal('Node'), id: z.string().min(1).max(256) })
|
|
13
14
|
]);
|
|
14
15
|
export type UiLinkTarget = z.infer<typeof UiLinkTargetSchema>;
|
|
15
16
|
|