@copilotkit/runtime-client-gql 0.37.0 → 0.38.0-beta.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/.turbo/turbo-build.log +38 -38
- package/CHANGELOG.md +13 -0
- package/dist/{chunk-U2R23IMV.mjs → chunk-2Q2GXF23.mjs} +2 -2
- package/dist/chunk-3UZXTFVW.mjs +16 -0
- package/dist/chunk-3UZXTFVW.mjs.map +1 -0
- package/dist/chunk-A46MYH4L.mjs +41 -0
- package/dist/chunk-A46MYH4L.mjs.map +1 -0
- package/dist/{chunk-LAQOU7XH.mjs → chunk-J66RF3CC.mjs} +6 -2
- package/dist/chunk-J66RF3CC.mjs.map +1 -0
- package/dist/chunk-TGO2CTW7.mjs +49 -0
- package/dist/chunk-TGO2CTW7.mjs.map +1 -0
- package/dist/{chunk-EF6Z5BI6.mjs → chunk-W2Q6V75U.mjs} +2 -2
- package/dist/client/CopilotRuntimeClient.d.ts +3 -1
- package/dist/client/CopilotRuntimeClient.js +24 -5
- package/dist/client/CopilotRuntimeClient.js.map +1 -1
- package/dist/client/CopilotRuntimeClient.mjs +4 -4
- package/dist/client/conversion.mjs +3 -3
- package/dist/client/index.js +24 -5
- package/dist/client/index.js.map +1 -1
- package/dist/client/index.mjs +6 -6
- package/dist/client/types.js.map +1 -1
- package/dist/client/types.mjs +2 -2
- package/dist/graphql/@generated/gql.d.ts +2 -2
- package/dist/graphql/@generated/gql.js +2 -2
- package/dist/graphql/@generated/gql.js.map +1 -1
- package/dist/graphql/@generated/gql.mjs +2 -2
- package/dist/graphql/@generated/graphql.d.ts +17 -5
- package/dist/graphql/@generated/graphql.js +9 -1
- package/dist/graphql/@generated/graphql.js.map +1 -1
- package/dist/graphql/@generated/graphql.mjs +3 -1
- package/dist/graphql/@generated/index.js +2 -2
- package/dist/graphql/@generated/index.js.map +1 -1
- package/dist/graphql/@generated/index.mjs +2 -2
- package/dist/graphql/definitions/mutations.js +6 -2
- package/dist/graphql/definitions/mutations.js.map +1 -1
- package/dist/graphql/definitions/mutations.mjs +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +32 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -6
- package/package.json +3 -3
- package/src/client/CopilotRuntimeClient.ts +24 -2
- package/src/graphql/@generated/gql.ts +2 -2
- package/src/graphql/@generated/graphql.ts +14 -6
- package/src/graphql/definitions/mutations.ts +4 -0
- package/dist/chunk-2EWRNIRK.mjs +0 -16
- package/dist/chunk-2EWRNIRK.mjs.map +0 -1
- package/dist/chunk-4RLWPF2O.mjs +0 -34
- package/dist/chunk-4RLWPF2O.mjs.map +0 -1
- package/dist/chunk-LAQOU7XH.mjs.map +0 -1
- package/dist/chunk-QBSZIZYP.mjs +0 -34
- package/dist/chunk-QBSZIZYP.mjs.map +0 -1
- /package/dist/{chunk-U2R23IMV.mjs.map → chunk-2Q2GXF23.mjs.map} +0 -0
- /package/dist/{chunk-EF6Z5BI6.mjs.map → chunk-W2Q6V75U.mjs.map} +0 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @copilotkit/runtime-client-gql@0.
|
|
2
|
+
> @copilotkit/runtime-client-gql@0.38.0-beta.0 build /home/runner/work/CopilotKit/CopilotKit/CopilotKit/packages/runtime-client-gql
|
|
3
3
|
> tsup --clean
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts, src/client/CopilotRuntimeClient.ts, src/client/conversion.ts, src/client/index.ts, src/client/types.ts, src/graphql/@generated/fragment-masking.ts, src/graphql/@generated/gql.ts, src/graphql/@generated/graphql.ts, src/graphql/@generated/index.ts, src/graphql/definitions/mutations.ts
|
|
@@ -10,35 +10,35 @@
|
|
|
10
10
|
[34mCLI[39m Cleaning output folder
|
|
11
11
|
[34mESM[39m Build start
|
|
12
12
|
[34mCJS[39m Build start
|
|
13
|
-
[32mESM[39m [1mdist/index.mjs [22m[
|
|
13
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m908.00 B[39m
|
|
14
14
|
[32mESM[39m [1mdist/client/types.mjs [22m[32m271.00 B[39m
|
|
15
|
+
[32mESM[39m [1mdist/chunk-TGO2CTW7.mjs [22m[32m1.20 KB[39m
|
|
15
16
|
[32mESM[39m [1mdist/chunk-7ECCT6PK.mjs [22m[32m43.00 B[39m
|
|
16
|
-
[32mESM[39m [1mdist/chunk-
|
|
17
|
-
[32mESM[39m [1mdist/chunk-
|
|
18
|
-
[32mESM[39m [1mdist/chunk-
|
|
19
|
-
[32mESM[39m [1mdist/chunk-EF6Z5BI6.mjs [22m[32m1.12 KB[39m
|
|
17
|
+
[32mESM[39m [1mdist/chunk-J66RF3CC.mjs [22m[32m1.43 KB[39m
|
|
18
|
+
[32mESM[39m [1mdist/chunk-2Q2GXF23.mjs [22m[32m2.55 KB[39m
|
|
19
|
+
[32mESM[39m [1mdist/chunk-W2Q6V75U.mjs [22m[32m1.12 KB[39m
|
|
20
20
|
[32mESM[39m [1mdist/chunk-KK4MQSI3.mjs [22m[32m778.00 B[39m
|
|
21
|
-
[32mESM[39m [1mdist/chunk-
|
|
22
|
-
[32mESM[39m [1mdist/chunk-QBSZIZYP.mjs [22m[32m6.21 KB[39m
|
|
21
|
+
[32mESM[39m [1mdist/chunk-A46MYH4L.mjs [22m[32m6.97 KB[39m
|
|
23
22
|
[32mESM[39m [1mdist/graphql/@generated/index.mjs [22m[32m296.00 B[39m
|
|
23
|
+
[32mESM[39m [1mdist/chunk-3UZXTFVW.mjs [22m[32m1.52 KB[39m
|
|
24
24
|
[32mESM[39m [1mdist/graphql/definitions/mutations.mjs [22m[32m232.00 B[39m
|
|
25
25
|
[32mESM[39m [1mdist/client/CopilotRuntimeClient.mjs [22m[32m244.00 B[39m
|
|
26
26
|
[32mESM[39m [1mdist/client/conversion.mjs [22m[32m272.00 B[39m
|
|
27
27
|
[32mESM[39m [1mdist/client/index.mjs [22m[32m613.00 B[39m
|
|
28
|
-
[32mESM[39m [1mdist/graphql/@generated/gql.mjs [22m[32m143.00 B[39m
|
|
29
28
|
[32mESM[39m [1mdist/graphql/@generated/fragment-masking.mjs [22m[32m207.00 B[39m
|
|
30
|
-
[32mESM[39m [1mdist/graphql/@generated/
|
|
29
|
+
[32mESM[39m [1mdist/graphql/@generated/gql.mjs [22m[32m143.00 B[39m
|
|
30
|
+
[32mESM[39m [1mdist/graphql/@generated/graphql.mjs [22m[32m384.00 B[39m
|
|
31
31
|
[32mESM[39m [1mdist/index.mjs.map [22m[32m71.00 B[39m
|
|
32
32
|
[32mESM[39m [1mdist/client/types.mjs.map [22m[32m71.00 B[39m
|
|
33
|
+
[32mESM[39m [1mdist/chunk-TGO2CTW7.mjs.map [22m[32m2.73 KB[39m
|
|
33
34
|
[32mESM[39m [1mdist/chunk-7ECCT6PK.mjs.map [22m[32m71.00 B[39m
|
|
34
|
-
[32mESM[39m [1mdist/chunk-
|
|
35
|
-
[32mESM[39m [1mdist/chunk-
|
|
36
|
-
[32mESM[39m [1mdist/chunk-
|
|
37
|
-
[32mESM[39m [1mdist/chunk-EF6Z5BI6.mjs.map [22m[32m3.19 KB[39m
|
|
35
|
+
[32mESM[39m [1mdist/chunk-J66RF3CC.mjs.map [22m[32m1.77 KB[39m
|
|
36
|
+
[32mESM[39m [1mdist/chunk-2Q2GXF23.mjs.map [22m[32m4.40 KB[39m
|
|
37
|
+
[32mESM[39m [1mdist/chunk-W2Q6V75U.mjs.map [22m[32m3.19 KB[39m
|
|
38
38
|
[32mESM[39m [1mdist/chunk-KK4MQSI3.mjs.map [22m[32m3.29 KB[39m
|
|
39
|
-
[32mESM[39m [1mdist/chunk-
|
|
40
|
-
[32mESM[39m [1mdist/chunk-QBSZIZYP.mjs.map [22m[32m17.70 KB[39m
|
|
39
|
+
[32mESM[39m [1mdist/chunk-A46MYH4L.mjs.map [22m[32m18.88 KB[39m
|
|
41
40
|
[32mESM[39m [1mdist/graphql/@generated/index.mjs.map [22m[32m71.00 B[39m
|
|
41
|
+
[32mESM[39m [1mdist/chunk-3UZXTFVW.mjs.map [22m[32m5.53 KB[39m
|
|
42
42
|
[32mESM[39m [1mdist/graphql/definitions/mutations.mjs.map [22m[32m71.00 B[39m
|
|
43
43
|
[32mESM[39m [1mdist/client/CopilotRuntimeClient.mjs.map [22m[32m71.00 B[39m
|
|
44
44
|
[32mESM[39m [1mdist/client/conversion.mjs.map [22m[32m71.00 B[39m
|
|
@@ -46,37 +46,37 @@
|
|
|
46
46
|
[32mESM[39m [1mdist/graphql/@generated/gql.mjs.map [22m[32m71.00 B[39m
|
|
47
47
|
[32mESM[39m [1mdist/graphql/@generated/fragment-masking.mjs.map [22m[32m71.00 B[39m
|
|
48
48
|
[32mESM[39m [1mdist/graphql/@generated/graphql.mjs.map [22m[32m71.00 B[39m
|
|
49
|
-
[32mESM[39m ⚡️ Build success in
|
|
50
|
-
[32mCJS[39m [1mdist/index.js [22m[
|
|
51
|
-
[32mCJS[39m [1mdist/client/CopilotRuntimeClient.js [22m[
|
|
49
|
+
[32mESM[39m ⚡️ Build success in 41ms
|
|
50
|
+
[32mCJS[39m [1mdist/index.js [22m[32m16.44 KB[39m
|
|
51
|
+
[32mCJS[39m [1mdist/client/CopilotRuntimeClient.js [22m[32m10.33 KB[39m
|
|
52
52
|
[32mCJS[39m [1mdist/client/conversion.js [22m[32m5.13 KB[39m
|
|
53
|
+
[32mCJS[39m [1mdist/client/index.js [22m[32m14.86 KB[39m
|
|
53
54
|
[32mCJS[39m [1mdist/client/types.js [22m[32m2.47 KB[39m
|
|
54
|
-
[32mCJS[39m [1mdist/client/index.js [22m[32m13.99 KB[39m
|
|
55
|
-
[32mCJS[39m [1mdist/graphql/@generated/gql.js [22m[32m7.46 KB[39m
|
|
56
55
|
[32mCJS[39m [1mdist/graphql/@generated/fragment-masking.js [22m[32m1.86 KB[39m
|
|
57
|
-
[32mCJS[39m [1mdist/graphql/@generated/
|
|
58
|
-
[32mCJS[39m [1mdist/graphql/@generated/
|
|
59
|
-
[32mCJS[39m [1mdist/graphql/definitions/mutations.js [22m[
|
|
60
|
-
[32mCJS[39m [1mdist/
|
|
61
|
-
[32mCJS[39m [1mdist/index.js.map [22m[
|
|
56
|
+
[32mCJS[39m [1mdist/graphql/@generated/gql.js [22m[32m7.87 KB[39m
|
|
57
|
+
[32mCJS[39m [1mdist/graphql/@generated/graphql.js [22m[32m8.23 KB[39m
|
|
58
|
+
[32mCJS[39m [1mdist/graphql/definitions/mutations.js [22m[32m9.26 KB[39m
|
|
59
|
+
[32mCJS[39m [1mdist/graphql/@generated/index.js [22m[32m8.72 KB[39m
|
|
60
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m36.37 KB[39m
|
|
61
|
+
[32mCJS[39m [1mdist/client/CopilotRuntimeClient.js.map [22m[32m28.10 KB[39m
|
|
62
62
|
[32mCJS[39m [1mdist/client/conversion.js.map [22m[32m7.58 KB[39m
|
|
63
|
-
[32mCJS[39m [1mdist/client/
|
|
64
|
-
[32mCJS[39m [1mdist/client/
|
|
65
|
-
[32mCJS[39m [1mdist/graphql/@generated/gql.js.map [22m[32m22.42 KB[39m
|
|
63
|
+
[32mCJS[39m [1mdist/client/index.js.map [22m[32m35.92 KB[39m
|
|
64
|
+
[32mCJS[39m [1mdist/client/types.js.map [22m[32m17.65 KB[39m
|
|
66
65
|
[32mCJS[39m [1mdist/graphql/@generated/fragment-masking.js.map [22m[32m3.35 KB[39m
|
|
67
|
-
[32mCJS[39m [1mdist/graphql/@generated/
|
|
68
|
-
[32mCJS[39m [1mdist/graphql/@generated/
|
|
69
|
-
[32mCJS[39m [1mdist/graphql/
|
|
70
|
-
[32mCJS[39m
|
|
66
|
+
[32mCJS[39m [1mdist/graphql/@generated/gql.js.map [22m[32m23.75 KB[39m
|
|
67
|
+
[32mCJS[39m [1mdist/graphql/@generated/graphql.js.map [22m[32m18.96 KB[39m
|
|
68
|
+
[32mCJS[39m [1mdist/graphql/@generated/index.js.map [22m[32m27.10 KB[39m
|
|
69
|
+
[32mCJS[39m [1mdist/graphql/definitions/mutations.js.map [22m[32m25.45 KB[39m
|
|
70
|
+
[32mCJS[39m ⚡️ Build success in 42ms
|
|
71
71
|
[34mDTS[39m Build start
|
|
72
|
-
[32mDTS[39m ⚡️ Build success in
|
|
73
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m1.
|
|
74
|
-
[32mDTS[39m [1mdist/client/CopilotRuntimeClient.d.ts [22m[
|
|
72
|
+
[32mDTS[39m ⚡️ Build success in 3085ms
|
|
73
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m1.20 KB[39m
|
|
74
|
+
[32mDTS[39m [1mdist/client/CopilotRuntimeClient.d.ts [22m[32m1.01 KB[39m
|
|
75
75
|
[32mDTS[39m [1mdist/client/conversion.d.ts [22m[32m467.00 B[39m
|
|
76
76
|
[32mDTS[39m [1mdist/client/types.d.ts [22m[32m1.76 KB[39m
|
|
77
|
-
[32mDTS[39m [1mdist/graphql/@generated/graphql.d.ts [22m[
|
|
77
|
+
[32mDTS[39m [1mdist/graphql/@generated/graphql.d.ts [22m[32m10.33 KB[39m
|
|
78
78
|
[32mDTS[39m [1mdist/client/index.d.ts [22m[32m374.00 B[39m
|
|
79
79
|
[32mDTS[39m [1mdist/graphql/@generated/fragment-masking.d.ts [22m[32m1.68 KB[39m
|
|
80
|
-
[32mDTS[39m [1mdist/graphql/@generated/gql.d.ts [22m[
|
|
80
|
+
[32mDTS[39m [1mdist/graphql/@generated/gql.d.ts [22m[32m5.19 KB[39m
|
|
81
81
|
[32mDTS[39m [1mdist/graphql/@generated/index.d.ts [22m[32m219.00 B[39m
|
|
82
82
|
[32mDTS[39m [1mdist/graphql/definitions/mutations.d.ts [22m[32m454.00 B[39m
|
package/CHANGELOG.md
ADDED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
ActionExecutionMessage,
|
|
3
3
|
ResultMessage,
|
|
4
4
|
TextMessage
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-W2Q6V75U.mjs";
|
|
6
6
|
|
|
7
7
|
// src/client/conversion.ts
|
|
8
8
|
import untruncateJson from "untruncate-json";
|
|
@@ -86,4 +86,4 @@ export {
|
|
|
86
86
|
convertMessagesToGqlInput,
|
|
87
87
|
convertGqlOutputToMessages
|
|
88
88
|
};
|
|
89
|
-
//# sourceMappingURL=chunk-
|
|
89
|
+
//# sourceMappingURL=chunk-2Q2GXF23.mjs.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GenerateCopilotResponseDocument
|
|
3
|
+
} from "./chunk-A46MYH4L.mjs";
|
|
4
|
+
|
|
5
|
+
// src/graphql/@generated/gql.ts
|
|
6
|
+
var documents = {
|
|
7
|
+
"\n mutation generateCopilotResponse($data: GenerateCopilotResponseInput!, $properties: JSONObject) {\n generateCopilotResponse(data: $data, properties: $properties) {\n threadId\n runId\n ... on CopilotResponse @defer {\n status {\n ... on BaseResponseStatus {\n code\n }\n ... on FailedResponseStatus {\n reason\n details\n }\n }\n }\n messages @stream {\n __typename\n ... on BaseMessageOutput {\n id\n createdAt\n }\n ... on BaseMessageOutput @defer {\n status {\n ... on SuccessMessageStatus {\n code\n }\n ... on FailedMessageStatus {\n code\n reason\n }\n ... on PendingMessageStatus {\n code\n }\n }\n }\n ... on TextMessageOutput {\n content @stream\n role\n }\n ... on ActionExecutionMessageOutput {\n name\n scope\n arguments @stream\n }\n ... on ResultMessageOutput {\n result\n actionExecutionId\n actionName\n }\n }\n }\n }\n": GenerateCopilotResponseDocument
|
|
8
|
+
};
|
|
9
|
+
function graphql(source) {
|
|
10
|
+
return documents[source] ?? {};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
graphql
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=chunk-3UZXTFVW.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/graphql/@generated/gql.ts"],"sourcesContent":["/* eslint-disable */\nimport * as types from './graphql';\nimport type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\n\n/**\n * Map of all GraphQL operations in the project.\n *\n * This map has several performance disadvantages:\n * 1. It is not tree-shakeable, so it will include all operations in the project.\n * 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle.\n * 3. It does not support dead code elimination, so it will add unused operations.\n *\n * Therefore it is highly recommended to use the babel or swc plugin for production.\n */\nconst documents = {\n \"\\n mutation generateCopilotResponse($data: GenerateCopilotResponseInput!, $properties: JSONObject) {\\n generateCopilotResponse(data: $data, properties: $properties) {\\n threadId\\n runId\\n ... on CopilotResponse @defer {\\n status {\\n ... on BaseResponseStatus {\\n code\\n }\\n ... on FailedResponseStatus {\\n reason\\n details\\n }\\n }\\n }\\n messages @stream {\\n __typename\\n ... on BaseMessageOutput {\\n id\\n createdAt\\n }\\n ... on BaseMessageOutput @defer {\\n status {\\n ... on SuccessMessageStatus {\\n code\\n }\\n ... on FailedMessageStatus {\\n code\\n reason\\n }\\n ... on PendingMessageStatus {\\n code\\n }\\n }\\n }\\n ... on TextMessageOutput {\\n content @stream\\n role\\n }\\n ... on ActionExecutionMessageOutput {\\n name\\n scope\\n arguments @stream\\n }\\n ... on ResultMessageOutput {\\n result\\n actionExecutionId\\n actionName\\n }\\n }\\n }\\n }\\n\": types.GenerateCopilotResponseDocument,\n};\n\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n *\n *\n * @example\n * ```ts\n * const query = graphql(`query GetUser($id: ID!) { user(id: $id) { name } }`);\n * ```\n *\n * The query argument is unknown!\n * Please regenerate the types.\n */\nexport function graphql(source: string): unknown;\n\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function graphql(source: \"\\n mutation generateCopilotResponse($data: GenerateCopilotResponseInput!, $properties: JSONObject) {\\n generateCopilotResponse(data: $data, properties: $properties) {\\n threadId\\n runId\\n ... on CopilotResponse @defer {\\n status {\\n ... on BaseResponseStatus {\\n code\\n }\\n ... on FailedResponseStatus {\\n reason\\n details\\n }\\n }\\n }\\n messages @stream {\\n __typename\\n ... on BaseMessageOutput {\\n id\\n createdAt\\n }\\n ... on BaseMessageOutput @defer {\\n status {\\n ... on SuccessMessageStatus {\\n code\\n }\\n ... on FailedMessageStatus {\\n code\\n reason\\n }\\n ... on PendingMessageStatus {\\n code\\n }\\n }\\n }\\n ... on TextMessageOutput {\\n content @stream\\n role\\n }\\n ... on ActionExecutionMessageOutput {\\n name\\n scope\\n arguments @stream\\n }\\n ... on ResultMessageOutput {\\n result\\n actionExecutionId\\n actionName\\n }\\n }\\n }\\n }\\n\"): (typeof documents)[\"\\n mutation generateCopilotResponse($data: GenerateCopilotResponseInput!, $properties: JSONObject) {\\n generateCopilotResponse(data: $data, properties: $properties) {\\n threadId\\n runId\\n ... on CopilotResponse @defer {\\n status {\\n ... on BaseResponseStatus {\\n code\\n }\\n ... on FailedResponseStatus {\\n reason\\n details\\n }\\n }\\n }\\n messages @stream {\\n __typename\\n ... on BaseMessageOutput {\\n id\\n createdAt\\n }\\n ... on BaseMessageOutput @defer {\\n status {\\n ... on SuccessMessageStatus {\\n code\\n }\\n ... on FailedMessageStatus {\\n code\\n reason\\n }\\n ... on PendingMessageStatus {\\n code\\n }\\n }\\n }\\n ... on TextMessageOutput {\\n content @stream\\n role\\n }\\n ... on ActionExecutionMessageOutput {\\n name\\n scope\\n arguments @stream\\n }\\n ... on ResultMessageOutput {\\n result\\n actionExecutionId\\n actionName\\n }\\n }\\n }\\n }\\n\"];\n\nexport function graphql(source: string) {\n return (documents as any)[source] ?? {};\n}\n\nexport type DocumentType<TDocumentNode extends DocumentNode<any, any>> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never;"],"mappings":";;;;;AAcA,IAAM,YAAY;AAAA,EACd,kvCAAwvC;AAC5vC;AAqBO,SAAS,QAAQ,QAAgB;AACtC,SAAQ,UAAkB,MAAM,KAAK,CAAC;AACxC;","names":[]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// src/graphql/@generated/graphql.ts
|
|
2
|
+
var ActionExecutionScope = /* @__PURE__ */ ((ActionExecutionScope2) => {
|
|
3
|
+
ActionExecutionScope2["Client"] = "client";
|
|
4
|
+
ActionExecutionScope2["Server"] = "server";
|
|
5
|
+
return ActionExecutionScope2;
|
|
6
|
+
})(ActionExecutionScope || {});
|
|
7
|
+
var FailedResponseStatusReason = /* @__PURE__ */ ((FailedResponseStatusReason2) => {
|
|
8
|
+
FailedResponseStatusReason2["GuardrailsValidationFailed"] = "GUARDRAILS_VALIDATION_FAILED";
|
|
9
|
+
FailedResponseStatusReason2["MessageStreamInterrupted"] = "MESSAGE_STREAM_INTERRUPTED";
|
|
10
|
+
FailedResponseStatusReason2["UnknownError"] = "UNKNOWN_ERROR";
|
|
11
|
+
return FailedResponseStatusReason2;
|
|
12
|
+
})(FailedResponseStatusReason || {});
|
|
13
|
+
var MessageRole = /* @__PURE__ */ ((MessageRole2) => {
|
|
14
|
+
MessageRole2["Assistant"] = "assistant";
|
|
15
|
+
MessageRole2["System"] = "system";
|
|
16
|
+
MessageRole2["User"] = "user";
|
|
17
|
+
return MessageRole2;
|
|
18
|
+
})(MessageRole || {});
|
|
19
|
+
var MessageStatusCode = /* @__PURE__ */ ((MessageStatusCode2) => {
|
|
20
|
+
MessageStatusCode2["Failed"] = "Failed";
|
|
21
|
+
MessageStatusCode2["Pending"] = "Pending";
|
|
22
|
+
MessageStatusCode2["Success"] = "Success";
|
|
23
|
+
return MessageStatusCode2;
|
|
24
|
+
})(MessageStatusCode || {});
|
|
25
|
+
var ResponseStatusCode = /* @__PURE__ */ ((ResponseStatusCode2) => {
|
|
26
|
+
ResponseStatusCode2["Failed"] = "Failed";
|
|
27
|
+
ResponseStatusCode2["Pending"] = "Pending";
|
|
28
|
+
ResponseStatusCode2["Success"] = "Success";
|
|
29
|
+
return ResponseStatusCode2;
|
|
30
|
+
})(ResponseStatusCode || {});
|
|
31
|
+
var GenerateCopilotResponseDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "generateCopilotResponse" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "data" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "GenerateCopilotResponseInput" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "properties" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "JSONObject" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "generateCopilotResponse" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "data" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "data" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "properties" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "properties" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "threadId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "runId" } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "CopilotResponse" } }, "directives": [{ "kind": "Directive", "name": { "kind": "Name", "value": "defer" } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "status" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "BaseResponseStatus" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "code" } }] } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "FailedResponseStatus" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "reason" } }, { "kind": "Field", "name": { "kind": "Name", "value": "details" } }] } }] } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "messages" }, "directives": [{ "kind": "Directive", "name": { "kind": "Name", "value": "stream" } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "__typename" } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "BaseMessageOutput" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "createdAt" } }] } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "BaseMessageOutput" } }, "directives": [{ "kind": "Directive", "name": { "kind": "Name", "value": "defer" } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "status" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "SuccessMessageStatus" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "code" } }] } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "FailedMessageStatus" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "code" } }, { "kind": "Field", "name": { "kind": "Name", "value": "reason" } }] } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "PendingMessageStatus" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "code" } }] } }] } }] } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "TextMessageOutput" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "content" }, "directives": [{ "kind": "Directive", "name": { "kind": "Name", "value": "stream" } }] }, { "kind": "Field", "name": { "kind": "Name", "value": "role" } }] } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "ActionExecutionMessageOutput" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "scope" } }, { "kind": "Field", "name": { "kind": "Name", "value": "arguments" }, "directives": [{ "kind": "Directive", "name": { "kind": "Name", "value": "stream" } }] }] } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "ResultMessageOutput" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "result" } }, { "kind": "Field", "name": { "kind": "Name", "value": "actionExecutionId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "actionName" } }] } }] } }] } }] } }] };
|
|
32
|
+
|
|
33
|
+
export {
|
|
34
|
+
ActionExecutionScope,
|
|
35
|
+
FailedResponseStatusReason,
|
|
36
|
+
MessageRole,
|
|
37
|
+
MessageStatusCode,
|
|
38
|
+
ResponseStatusCode,
|
|
39
|
+
GenerateCopilotResponseDocument
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=chunk-A46MYH4L.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/graphql/@generated/graphql.ts"],"sourcesContent":["/* eslint-disable */\nimport type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\nexport type Maybe<T> = T | null;\nexport type InputMaybe<T> = Maybe<T>;\nexport type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };\nexport type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };\nexport type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };\nexport type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };\nexport type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: { input: string; output: string; }\n String: { input: string; output: string; }\n Boolean: { input: boolean; output: boolean; }\n Int: { input: number; output: number; }\n Float: { input: number; output: number; }\n /** A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the `date-time` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar.This scalar is serialized to a string in ISO 8601 format and parsed from a string in ISO 8601 format. */\n DateTimeISO: { input: any; output: any; }\n /** The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */\n JSON: { input: any; output: any; }\n /** The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */\n JSONObject: { input: any; output: any; }\n};\n\nexport type ActionExecutionMessageInput = {\n arguments: Scalars['String']['input'];\n name: Scalars['String']['input'];\n scope: ActionExecutionScope;\n};\n\nexport type ActionExecutionMessageOutput = BaseMessageOutput & {\n __typename?: 'ActionExecutionMessageOutput';\n arguments: Array<Scalars['String']['output']>;\n createdAt: Scalars['DateTimeISO']['output'];\n id: Scalars['String']['output'];\n name: Scalars['String']['output'];\n scope: ActionExecutionScope;\n status: MessageStatus;\n};\n\n/** The scope of the action */\nexport enum ActionExecutionScope {\n Client = 'client',\n Server = 'server'\n}\n\nexport type ActionInput = {\n description: Scalars['String']['input'];\n jsonSchema: Scalars['String']['input'];\n name: Scalars['String']['input'];\n};\n\nexport type BaseMessageOutput = {\n createdAt: Scalars['DateTimeISO']['output'];\n id: Scalars['String']['output'];\n status: MessageStatus;\n};\n\nexport type BaseResponseStatus = {\n code: ResponseStatusCode;\n};\n\nexport type CloudInput = {\n guardrails?: InputMaybe<GuardrailsInput>;\n};\n\nexport type CopilotResponse = {\n __typename?: 'CopilotResponse';\n messages: Array<BaseMessageOutput>;\n runId?: Maybe<Scalars['String']['output']>;\n status: ResponseStatus;\n threadId: Scalars['String']['output'];\n};\n\nexport type FailedMessageStatus = {\n __typename?: 'FailedMessageStatus';\n code: MessageStatusCode;\n reason: Scalars['String']['output'];\n};\n\nexport type FailedResponseStatus = BaseResponseStatus & {\n __typename?: 'FailedResponseStatus';\n code: ResponseStatusCode;\n details?: Maybe<Scalars['JSON']['output']>;\n reason: FailedResponseStatusReason;\n};\n\nexport enum FailedResponseStatusReason {\n GuardrailsValidationFailed = 'GUARDRAILS_VALIDATION_FAILED',\n MessageStreamInterrupted = 'MESSAGE_STREAM_INTERRUPTED',\n UnknownError = 'UNKNOWN_ERROR'\n}\n\nexport type FrontendInput = {\n actions: Array<ActionInput>;\n toDeprecate_fullContext?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type GenerateCopilotResponseInput = {\n cloud?: InputMaybe<CloudInput>;\n frontend: FrontendInput;\n messages: Array<MessageInput>;\n runId?: InputMaybe<Scalars['String']['input']>;\n threadId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type GuardrailsInput = {\n inputValidationRules?: InputMaybe<GuardrailsRuleInput>;\n};\n\nexport type GuardrailsRuleInput = {\n allowList?: InputMaybe<Array<Scalars['String']['input']>>;\n denyList?: InputMaybe<Array<Scalars['String']['input']>>;\n};\n\nexport type MessageInput = {\n actionExecutionMessage?: InputMaybe<ActionExecutionMessageInput>;\n createdAt: Scalars['DateTimeISO']['input'];\n id: Scalars['String']['input'];\n resultMessage?: InputMaybe<ResultMessageInput>;\n textMessage?: InputMaybe<TextMessageInput>;\n};\n\n/** The role of the message */\nexport enum MessageRole {\n Assistant = 'assistant',\n System = 'system',\n User = 'user'\n}\n\nexport type MessageStatus = FailedMessageStatus | PendingMessageStatus | SuccessMessageStatus;\n\nexport enum MessageStatusCode {\n Failed = 'Failed',\n Pending = 'Pending',\n Success = 'Success'\n}\n\nexport type Mutation = {\n __typename?: 'Mutation';\n generateCopilotResponse: CopilotResponse;\n};\n\n\nexport type MutationGenerateCopilotResponseArgs = {\n data: GenerateCopilotResponseInput;\n properties?: InputMaybe<Scalars['JSONObject']['input']>;\n};\n\nexport type PendingMessageStatus = {\n __typename?: 'PendingMessageStatus';\n code: MessageStatusCode;\n};\n\nexport type PendingResponseStatus = BaseResponseStatus & {\n __typename?: 'PendingResponseStatus';\n code: ResponseStatusCode;\n};\n\nexport type Query = {\n __typename?: 'Query';\n hello: Scalars['String']['output'];\n};\n\nexport type ResponseStatus = FailedResponseStatus | PendingResponseStatus | SuccessResponseStatus;\n\nexport enum ResponseStatusCode {\n Failed = 'Failed',\n Pending = 'Pending',\n Success = 'Success'\n}\n\nexport type ResultMessageInput = {\n actionExecutionId: Scalars['String']['input'];\n actionName: Scalars['String']['input'];\n result: Scalars['String']['input'];\n};\n\nexport type ResultMessageOutput = BaseMessageOutput & {\n __typename?: 'ResultMessageOutput';\n actionExecutionId: Scalars['String']['output'];\n actionName: Scalars['String']['output'];\n createdAt: Scalars['DateTimeISO']['output'];\n id: Scalars['String']['output'];\n result: Scalars['String']['output'];\n status: MessageStatus;\n};\n\nexport type SuccessMessageStatus = {\n __typename?: 'SuccessMessageStatus';\n code: MessageStatusCode;\n};\n\nexport type SuccessResponseStatus = BaseResponseStatus & {\n __typename?: 'SuccessResponseStatus';\n code: ResponseStatusCode;\n};\n\nexport type TextMessageInput = {\n content: Scalars['String']['input'];\n role: MessageRole;\n};\n\nexport type TextMessageOutput = BaseMessageOutput & {\n __typename?: 'TextMessageOutput';\n content: Array<Scalars['String']['output']>;\n createdAt: Scalars['DateTimeISO']['output'];\n id: Scalars['String']['output'];\n role: MessageRole;\n status: MessageStatus;\n};\n\nexport type GenerateCopilotResponseMutationVariables = Exact<{\n data: GenerateCopilotResponseInput;\n properties?: InputMaybe<Scalars['JSONObject']['input']>;\n}>;\n\n\nexport type GenerateCopilotResponseMutation = { __typename?: 'Mutation', generateCopilotResponse: { __typename?: 'CopilotResponse', threadId: string, runId?: string | null, messages: Array<{ __typename: 'ActionExecutionMessageOutput', id: string, createdAt: any, name: string, scope: ActionExecutionScope, arguments: Array<string>, status: { __typename?: 'FailedMessageStatus', code: MessageStatusCode, reason: string } | { __typename?: 'PendingMessageStatus', code: MessageStatusCode } | { __typename?: 'SuccessMessageStatus', code: MessageStatusCode } } | { __typename: 'ResultMessageOutput', id: string, createdAt: any, result: string, actionExecutionId: string, actionName: string, status: { __typename?: 'FailedMessageStatus', code: MessageStatusCode, reason: string } | { __typename?: 'PendingMessageStatus', code: MessageStatusCode } | { __typename?: 'SuccessMessageStatus', code: MessageStatusCode } } | { __typename: 'TextMessageOutput', id: string, createdAt: any, content: Array<string>, role: MessageRole, status: { __typename?: 'FailedMessageStatus', code: MessageStatusCode, reason: string } | { __typename?: 'PendingMessageStatus', code: MessageStatusCode } | { __typename?: 'SuccessMessageStatus', code: MessageStatusCode } }> } & ({ __typename?: 'CopilotResponse', status: { __typename?: 'FailedResponseStatus', code: ResponseStatusCode, reason: FailedResponseStatusReason, details?: any | null } | { __typename?: 'PendingResponseStatus', code: ResponseStatusCode } | { __typename?: 'SuccessResponseStatus', code: ResponseStatusCode } } | { __typename?: 'CopilotResponse', status?: never }) };\n\n\nexport const GenerateCopilotResponseDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"generateCopilotResponse\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"data\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"GenerateCopilotResponseInput\"}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"properties\"}},\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"JSONObject\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"generateCopilotResponse\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"data\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"data\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"properties\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"properties\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"threadId\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"runId\"}},{\"kind\":\"InlineFragment\",\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"CopilotResponse\"}},\"directives\":[{\"kind\":\"Directive\",\"name\":{\"kind\":\"Name\",\"value\":\"defer\"}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"status\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"InlineFragment\",\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"BaseResponseStatus\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"code\"}}]}},{\"kind\":\"InlineFragment\",\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"FailedResponseStatus\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"reason\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"details\"}}]}}]}}]}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"messages\"},\"directives\":[{\"kind\":\"Directive\",\"name\":{\"kind\":\"Name\",\"value\":\"stream\"}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"__typename\"}},{\"kind\":\"InlineFragment\",\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"BaseMessageOutput\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"createdAt\"}}]}},{\"kind\":\"InlineFragment\",\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"BaseMessageOutput\"}},\"directives\":[{\"kind\":\"Directive\",\"name\":{\"kind\":\"Name\",\"value\":\"defer\"}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"status\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"InlineFragment\",\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"SuccessMessageStatus\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"code\"}}]}},{\"kind\":\"InlineFragment\",\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"FailedMessageStatus\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"code\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"reason\"}}]}},{\"kind\":\"InlineFragment\",\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"PendingMessageStatus\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"code\"}}]}}]}}]}},{\"kind\":\"InlineFragment\",\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"TextMessageOutput\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"content\"},\"directives\":[{\"kind\":\"Directive\",\"name\":{\"kind\":\"Name\",\"value\":\"stream\"}}]},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"role\"}}]}},{\"kind\":\"InlineFragment\",\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"ActionExecutionMessageOutput\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"name\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"scope\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"arguments\"},\"directives\":[{\"kind\":\"Directive\",\"name\":{\"kind\":\"Name\",\"value\":\"stream\"}}]}]}},{\"kind\":\"InlineFragment\",\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"ResultMessageOutput\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"result\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"actionExecutionId\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"actionName\"}}]}}]}}]}}]}}]} as unknown as DocumentNode<GenerateCopilotResponseMutation, GenerateCopilotResponseMutationVariables>;"],"mappings":";AAyCO,IAAK,uBAAL,kBAAKA,0BAAL;AACL,EAAAA,sBAAA,YAAS;AACT,EAAAA,sBAAA,YAAS;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,GAAE,cAAa,CAAC,EAAC,QAAO,aAAY,QAAO,EAAC,QAAO,QAAO,SAAQ,SAAQ,EAAC,CAAC,EAAC,CAAC,EAAC,EAAC,GAAE,EAAC,QAAO,kBAAiB,iBAAgB,EAAC,QAAO,aAAY,QAAO,EAAC,QAAO,QAAO,SAAQ,sBAAqB,EAAC,GAAE,gBAAe,EAAC,QAAO,gBAAe,cAAa,CAAC,EAAC,QAAO,SAAQ,QAAO,EAAC,QAAO,QAAO,SAAQ,SAAQ,EAAC,GAAE,EAAC,QAAO,SAAQ,QAAO,EAAC,QAAO,QAAO,SAAQ,oBAAmB,EAAC,GAAE,EAAC,QAAO,SAAQ,QAAO,EAAC,QAAO,QAAO,SAAQ,aAAY,EAAC,CAAC,EAAC,EAAC,CAAC,EAAC,EAAC,CAAC,EAAC,EAAC,CAAC,EAAC,EAAC,CAAC,EAAC;","names":["ActionExecutionScope","FailedResponseStatusReason","MessageRole","MessageStatusCode","ResponseStatusCode"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
graphql
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3UZXTFVW.mjs";
|
|
4
4
|
|
|
5
5
|
// src/graphql/definitions/mutations.ts
|
|
6
6
|
var generateCopilotResponseMutation = graphql(
|
|
@@ -15,6 +15,10 @@ var generateCopilotResponseMutation = graphql(
|
|
|
15
15
|
... on BaseResponseStatus {
|
|
16
16
|
code
|
|
17
17
|
}
|
|
18
|
+
... on FailedResponseStatus {
|
|
19
|
+
reason
|
|
20
|
+
details
|
|
21
|
+
}
|
|
18
22
|
}
|
|
19
23
|
}
|
|
20
24
|
messages @stream {
|
|
@@ -60,4 +64,4 @@ var generateCopilotResponseMutation = graphql(
|
|
|
60
64
|
export {
|
|
61
65
|
generateCopilotResponseMutation
|
|
62
66
|
};
|
|
63
|
-
//# sourceMappingURL=chunk-
|
|
67
|
+
//# sourceMappingURL=chunk-J66RF3CC.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/graphql/definitions/mutations.ts"],"sourcesContent":["import { graphql } from \"../@generated/gql\";\n\nexport const generateCopilotResponseMutation = graphql(/** GraphQL **/ `\n mutation generateCopilotResponse($data: GenerateCopilotResponseInput!, $properties: JSONObject) {\n generateCopilotResponse(data: $data, properties: $properties) {\n threadId\n runId\n ... on CopilotResponse @defer {\n status {\n ... on BaseResponseStatus {\n code\n }\n ... on FailedResponseStatus {\n reason\n details\n }\n }\n }\n messages @stream {\n __typename\n ... on BaseMessageOutput {\n id\n createdAt\n }\n ... on BaseMessageOutput @defer {\n status {\n ... on SuccessMessageStatus {\n code\n }\n ... on FailedMessageStatus {\n code\n reason\n }\n ... on PendingMessageStatus {\n code\n }\n }\n }\n ... on TextMessageOutput {\n content @stream\n role\n }\n ... on ActionExecutionMessageOutput {\n name\n scope\n arguments @stream\n }\n ... on ResultMessageOutput {\n result\n actionExecutionId\n actionName\n }\n }\n }\n }\n`);\n"],"mappings":";;;;;AAEO,IAAM,kCAAkC;AAAA;AAAA,EAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAqDtE;","names":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {
|
|
2
|
+
generateCopilotResponseMutation
|
|
3
|
+
} from "./chunk-J66RF3CC.mjs";
|
|
4
|
+
|
|
5
|
+
// src/client/CopilotRuntimeClient.ts
|
|
6
|
+
import { Client, cacheExchange, fetchExchange } from "@urql/core";
|
|
7
|
+
var CopilotRuntimeClient = class {
|
|
8
|
+
constructor(options) {
|
|
9
|
+
const headers = {};
|
|
10
|
+
if (options.headers) {
|
|
11
|
+
Object.assign(headers, options.headers);
|
|
12
|
+
}
|
|
13
|
+
if (options.publicApiKey) {
|
|
14
|
+
headers["x-copilotcloud-public-api-key"] = options.publicApiKey;
|
|
15
|
+
}
|
|
16
|
+
this.client = new Client({
|
|
17
|
+
url: options.url,
|
|
18
|
+
exchanges: [cacheExchange, fetchExchange],
|
|
19
|
+
fetchOptions: {
|
|
20
|
+
headers
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
generateCopilotResponse(data, properties, signal) {
|
|
25
|
+
const result = this.client.mutation(
|
|
26
|
+
generateCopilotResponseMutation,
|
|
27
|
+
{ data, properties },
|
|
28
|
+
{ fetch: (url, opts) => fetch(url, { ...opts, signal }) }
|
|
29
|
+
);
|
|
30
|
+
return result;
|
|
31
|
+
}
|
|
32
|
+
static asStream(source) {
|
|
33
|
+
return new ReadableStream({
|
|
34
|
+
start(controller) {
|
|
35
|
+
source.subscribe(({ data, hasNext }) => {
|
|
36
|
+
controller.enqueue(data);
|
|
37
|
+
if (!hasNext) {
|
|
38
|
+
controller.close();
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export {
|
|
47
|
+
CopilotRuntimeClient
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=chunk-TGO2CTW7.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/client/CopilotRuntimeClient.ts"],"sourcesContent":["import { Client, cacheExchange, fetchExchange } from \"@urql/core\";\n\nimport {\n GenerateCopilotResponseMutation,\n GenerateCopilotResponseMutationVariables,\n} from \"../graphql/@generated/graphql\";\nimport { generateCopilotResponseMutation } from \"../graphql/definitions/mutations\";\nimport { OperationResultSource, OperationResult } from \"urql\";\n\ninterface CopilotRuntimeClientOptions {\n url: string;\n publicApiKey?: string;\n headers?: Record<string, string>;\n}\n\nexport class CopilotRuntimeClient {\n client: Client;\n\n constructor(options: CopilotRuntimeClientOptions) {\n const headers: Record<string, string> = {};\n\n if (options.headers) {\n Object.assign(headers, options.headers);\n }\n\n if (options.publicApiKey) {\n headers[\"x-copilotcloud-public-api-key\"] = options.publicApiKey;\n }\n\n this.client = new Client({\n url: options.url,\n exchanges: [cacheExchange, fetchExchange],\n fetchOptions: {\n headers,\n },\n });\n }\n\n generateCopilotResponse(\n data: GenerateCopilotResponseMutationVariables[\"data\"],\n properties?: GenerateCopilotResponseMutationVariables[\"properties\"],\n signal?: AbortSignal,\n ) {\n const result = this.client.mutation<\n GenerateCopilotResponseMutation,\n GenerateCopilotResponseMutationVariables\n >(\n generateCopilotResponseMutation,\n { data, properties },\n { fetch: (url, opts) => fetch(url, { ...opts, signal }) },\n );\n\n return result;\n }\n\n static asStream<S, T>(source: OperationResultSource<OperationResult<S, { data: T }>>) {\n return new ReadableStream<S>({\n start(controller) {\n source.subscribe(({ data, hasNext }) => {\n controller.enqueue(data);\n if (!hasNext) {\n controller.close();\n }\n });\n },\n });\n }\n}\n"],"mappings":";;;;;AAAA,SAAS,QAAQ,eAAe,qBAAqB;AAe9C,IAAM,uBAAN,MAA2B;AAAA,EAGhC,YAAY,SAAsC;AAChD,UAAM,UAAkC,CAAC;AAEzC,QAAI,QAAQ,SAAS;AACnB,aAAO,OAAO,SAAS,QAAQ,OAAO;AAAA,IACxC;AAEA,QAAI,QAAQ,cAAc;AACxB,cAAQ,+BAA+B,IAAI,QAAQ;AAAA,IACrD;AAEA,SAAK,SAAS,IAAI,OAAO;AAAA,MACvB,KAAK,QAAQ;AAAA,MACb,WAAW,CAAC,eAAe,aAAa;AAAA,MACxC,cAAc;AAAA,QACZ;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEA,wBACE,MACA,YACA,QACA;AACA,UAAM,SAAS,KAAK,OAAO;AAAA,MAIzB;AAAA,MACA,EAAE,MAAM,WAAW;AAAA,MACnB,EAAE,OAAO,CAAC,KAAK,SAAS,MAAM,KAAK,EAAE,GAAG,MAAM,OAAO,CAAC,EAAE;AAAA,IAC1D;AAEA,WAAO;AAAA,EACT;AAAA,EAEA,OAAO,SAAe,QAAgE;AACpF,WAAO,IAAI,eAAkB;AAAA,MAC3B,MAAM,YAAY;AAChB,eAAO,UAAU,CAAC,EAAE,MAAM,QAAQ,MAAM;AACtC,qBAAW,QAAQ,IAAI;AACvB,cAAI,CAAC,SAAS;AACZ,uBAAW,MAAM;AAAA,UACnB;AAAA,QACF,CAAC;AAAA,MACH;AAAA,IACF,CAAC;AAAA,EACH;AACF;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MessageRole
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-A46MYH4L.mjs";
|
|
4
4
|
|
|
5
5
|
// src/client/types.ts
|
|
6
6
|
import { nanoid } from "nanoid";
|
|
@@ -52,4 +52,4 @@ export {
|
|
|
52
52
|
ActionExecutionMessage,
|
|
53
53
|
ResultMessage
|
|
54
54
|
};
|
|
55
|
-
//# sourceMappingURL=chunk-
|
|
55
|
+
//# sourceMappingURL=chunk-W2Q6V75U.mjs.map
|
|
@@ -5,11 +5,13 @@ import '@graphql-typed-document-node/core';
|
|
|
5
5
|
|
|
6
6
|
interface CopilotRuntimeClientOptions {
|
|
7
7
|
url: string;
|
|
8
|
+
publicApiKey?: string;
|
|
9
|
+
headers?: Record<string, string>;
|
|
8
10
|
}
|
|
9
11
|
declare class CopilotRuntimeClient {
|
|
10
12
|
client: Client;
|
|
11
13
|
constructor(options: CopilotRuntimeClientOptions);
|
|
12
|
-
generateCopilotResponse(data: GenerateCopilotResponseMutationVariables["data"], properties?: GenerateCopilotResponseMutationVariables["properties"]): OperationResultSource<OperationResult<GenerateCopilotResponseMutation, Exact<{
|
|
14
|
+
generateCopilotResponse(data: GenerateCopilotResponseMutationVariables["data"], properties?: GenerateCopilotResponseMutationVariables["properties"], signal?: AbortSignal): OperationResultSource<OperationResult<GenerateCopilotResponseMutation, Exact<{
|
|
13
15
|
data: GenerateCopilotResponseInput;
|
|
14
16
|
properties?: any;
|
|
15
17
|
}>>>;
|
|
@@ -26,11 +26,11 @@ module.exports = __toCommonJS(CopilotRuntimeClient_exports);
|
|
|
26
26
|
var import_core = require("@urql/core");
|
|
27
27
|
|
|
28
28
|
// src/graphql/@generated/graphql.ts
|
|
29
|
-
var GenerateCopilotResponseDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "generateCopilotResponse" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "data" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "GenerateCopilotResponseInput" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "properties" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "JSONObject" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "generateCopilotResponse" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "data" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "data" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "properties" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "properties" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "threadId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "runId" } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "CopilotResponse" } }, "directives": [{ "kind": "Directive", "name": { "kind": "Name", "value": "defer" } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "status" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "BaseResponseStatus" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "code" } }] } }] } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "messages" }, "directives": [{ "kind": "Directive", "name": { "kind": "Name", "value": "stream" } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "__typename" } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "BaseMessageOutput" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "createdAt" } }] } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "BaseMessageOutput" } }, "directives": [{ "kind": "Directive", "name": { "kind": "Name", "value": "defer" } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "status" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "SuccessMessageStatus" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "code" } }] } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "FailedMessageStatus" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "code" } }, { "kind": "Field", "name": { "kind": "Name", "value": "reason" } }] } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "PendingMessageStatus" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "code" } }] } }] } }] } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "TextMessageOutput" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "content" }, "directives": [{ "kind": "Directive", "name": { "kind": "Name", "value": "stream" } }] }, { "kind": "Field", "name": { "kind": "Name", "value": "role" } }] } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "ActionExecutionMessageOutput" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "scope" } }, { "kind": "Field", "name": { "kind": "Name", "value": "arguments" }, "directives": [{ "kind": "Directive", "name": { "kind": "Name", "value": "stream" } }] }] } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "ResultMessageOutput" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "result" } }, { "kind": "Field", "name": { "kind": "Name", "value": "actionExecutionId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "actionName" } }] } }] } }] } }] } }] };
|
|
29
|
+
var GenerateCopilotResponseDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "generateCopilotResponse" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "data" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "GenerateCopilotResponseInput" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "properties" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "JSONObject" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "generateCopilotResponse" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "data" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "data" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "properties" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "properties" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "threadId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "runId" } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "CopilotResponse" } }, "directives": [{ "kind": "Directive", "name": { "kind": "Name", "value": "defer" } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "status" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "BaseResponseStatus" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "code" } }] } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "FailedResponseStatus" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "reason" } }, { "kind": "Field", "name": { "kind": "Name", "value": "details" } }] } }] } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "messages" }, "directives": [{ "kind": "Directive", "name": { "kind": "Name", "value": "stream" } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "__typename" } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "BaseMessageOutput" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "createdAt" } }] } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "BaseMessageOutput" } }, "directives": [{ "kind": "Directive", "name": { "kind": "Name", "value": "defer" } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "status" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "SuccessMessageStatus" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "code" } }] } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "FailedMessageStatus" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "code" } }, { "kind": "Field", "name": { "kind": "Name", "value": "reason" } }] } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "PendingMessageStatus" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "code" } }] } }] } }] } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "TextMessageOutput" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "content" }, "directives": [{ "kind": "Directive", "name": { "kind": "Name", "value": "stream" } }] }, { "kind": "Field", "name": { "kind": "Name", "value": "role" } }] } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "ActionExecutionMessageOutput" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "scope" } }, { "kind": "Field", "name": { "kind": "Name", "value": "arguments" }, "directives": [{ "kind": "Directive", "name": { "kind": "Name", "value": "stream" } }] }] } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "ResultMessageOutput" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "result" } }, { "kind": "Field", "name": { "kind": "Name", "value": "actionExecutionId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "actionName" } }] } }] } }] } }] } }] };
|
|
30
30
|
|
|
31
31
|
// src/graphql/@generated/gql.ts
|
|
32
32
|
var documents = {
|
|
33
|
-
"\n mutation generateCopilotResponse($data: GenerateCopilotResponseInput!, $properties: JSONObject) {\n generateCopilotResponse(data: $data, properties: $properties) {\n threadId\n runId\n ... on CopilotResponse @defer {\n status {\n ... on BaseResponseStatus {\n code\n }\n }\n }\n messages @stream {\n __typename\n ... on BaseMessageOutput {\n id\n createdAt\n }\n ... on BaseMessageOutput @defer {\n status {\n ... on SuccessMessageStatus {\n code\n }\n ... on FailedMessageStatus {\n code\n reason\n }\n ... on PendingMessageStatus {\n code\n }\n }\n }\n ... on TextMessageOutput {\n content @stream\n role\n }\n ... on ActionExecutionMessageOutput {\n name\n scope\n arguments @stream\n }\n ... on ResultMessageOutput {\n result\n actionExecutionId\n actionName\n }\n }\n }\n }\n": GenerateCopilotResponseDocument
|
|
33
|
+
"\n mutation generateCopilotResponse($data: GenerateCopilotResponseInput!, $properties: JSONObject) {\n generateCopilotResponse(data: $data, properties: $properties) {\n threadId\n runId\n ... on CopilotResponse @defer {\n status {\n ... on BaseResponseStatus {\n code\n }\n ... on FailedResponseStatus {\n reason\n details\n }\n }\n }\n messages @stream {\n __typename\n ... on BaseMessageOutput {\n id\n createdAt\n }\n ... on BaseMessageOutput @defer {\n status {\n ... on SuccessMessageStatus {\n code\n }\n ... on FailedMessageStatus {\n code\n reason\n }\n ... on PendingMessageStatus {\n code\n }\n }\n }\n ... on TextMessageOutput {\n content @stream\n role\n }\n ... on ActionExecutionMessageOutput {\n name\n scope\n arguments @stream\n }\n ... on ResultMessageOutput {\n result\n actionExecutionId\n actionName\n }\n }\n }\n }\n": GenerateCopilotResponseDocument
|
|
34
34
|
};
|
|
35
35
|
function graphql(source) {
|
|
36
36
|
return documents[source] ?? {};
|
|
@@ -49,6 +49,10 @@ var generateCopilotResponseMutation = graphql(
|
|
|
49
49
|
... on BaseResponseStatus {
|
|
50
50
|
code
|
|
51
51
|
}
|
|
52
|
+
... on FailedResponseStatus {
|
|
53
|
+
reason
|
|
54
|
+
details
|
|
55
|
+
}
|
|
52
56
|
}
|
|
53
57
|
}
|
|
54
58
|
messages @stream {
|
|
@@ -94,13 +98,28 @@ var generateCopilotResponseMutation = graphql(
|
|
|
94
98
|
// src/client/CopilotRuntimeClient.ts
|
|
95
99
|
var CopilotRuntimeClient = class {
|
|
96
100
|
constructor(options) {
|
|
101
|
+
const headers = {};
|
|
102
|
+
if (options.headers) {
|
|
103
|
+
Object.assign(headers, options.headers);
|
|
104
|
+
}
|
|
105
|
+
if (options.publicApiKey) {
|
|
106
|
+
headers["x-copilotcloud-public-api-key"] = options.publicApiKey;
|
|
107
|
+
}
|
|
97
108
|
this.client = new import_core.Client({
|
|
98
109
|
url: options.url,
|
|
99
|
-
exchanges: [import_core.cacheExchange, import_core.fetchExchange]
|
|
110
|
+
exchanges: [import_core.cacheExchange, import_core.fetchExchange],
|
|
111
|
+
fetchOptions: {
|
|
112
|
+
headers
|
|
113
|
+
}
|
|
100
114
|
});
|
|
101
115
|
}
|
|
102
|
-
generateCopilotResponse(data, properties) {
|
|
103
|
-
|
|
116
|
+
generateCopilotResponse(data, properties, signal) {
|
|
117
|
+
const result = this.client.mutation(
|
|
118
|
+
generateCopilotResponseMutation,
|
|
119
|
+
{ data, properties },
|
|
120
|
+
{ fetch: (url, opts) => fetch(url, { ...opts, signal }) }
|
|
121
|
+
);
|
|
122
|
+
return result;
|
|
104
123
|
}
|
|
105
124
|
static asStream(source) {
|
|
106
125
|
return new ReadableStream({
|