@opensumi/ide-core-common 2.27.3-next-1710834527.0 → 2.27.3-next-1710911932.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/types/ai-native/index.d.ts +44 -102
- package/lib/types/ai-native/index.d.ts.map +1 -1
- package/lib/types/ai-native/index.js +39 -18
- package/lib/types/ai-native/index.js.map +1 -1
- package/lib/types/ai-native/reporter.d.ts +15 -48
- package/lib/types/ai-native/reporter.d.ts.map +1 -1
- package/lib/types/ai-native/reporter.js +7 -10
- package/lib/types/ai-native/reporter.js.map +1 -1
- package/package.json +3 -3
- package/src/types/ai-native/index.ts +47 -106
- package/src/types/ai-native/reporter.ts +17 -44
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { CancellationToken } from '../../utils';
|
|
2
|
+
import { CancellationToken, MaybePromise } from '../../utils';
|
|
3
|
+
import { IAIReportCompletionOption } from './reporter';
|
|
4
|
+
export * from './reporter';
|
|
3
5
|
export interface IAINativeCapabilities {
|
|
4
6
|
/**
|
|
5
7
|
* Use opensumi design UI style
|
|
@@ -57,14 +59,6 @@ export interface IAICompletionOption {
|
|
|
57
59
|
fileUrl?: string;
|
|
58
60
|
sessionId?: string;
|
|
59
61
|
}
|
|
60
|
-
export interface IAIReportCompletionOption {
|
|
61
|
-
relationId: string;
|
|
62
|
-
sessionId: string;
|
|
63
|
-
accept: boolean;
|
|
64
|
-
repo?: string;
|
|
65
|
-
completionUseTime?: number;
|
|
66
|
-
renderingTime?: number;
|
|
67
|
-
}
|
|
68
62
|
export interface IAIBackService<BaseResponse extends IAIBackServiceResponse = IAIBackServiceResponse, StreamResponse extends NodeJS.ReadableStream = NodeJS.ReadableStream, CompletionResponse = IAICompletionResultModel> {
|
|
69
63
|
request<O extends IAIBackServiceOption>(input: string, options: O, cancelToken?: CancellationToken): Promise<BaseResponse>;
|
|
70
64
|
requestStream<O extends IAIBackServiceOption>(input: string, options: O, cancelToken?: CancellationToken): Promise<StreamResponse>;
|
|
@@ -72,98 +66,46 @@ export interface IAIBackService<BaseResponse extends IAIBackServiceResponse = IA
|
|
|
72
66
|
reportCompletion<I extends IAIReportCompletionOption>(input: I): Promise<void>;
|
|
73
67
|
destroyStreamRequest?: (sessionId: string) => Promise<void>;
|
|
74
68
|
}
|
|
75
|
-
export declare
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
export interface
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
useCommand: boolean;
|
|
117
|
-
useCommandSuccess: boolean;
|
|
118
|
-
}
|
|
119
|
-
export interface RunRT extends Partial<CommonLogInfo> {
|
|
120
|
-
runSuccess: boolean;
|
|
121
|
-
}
|
|
122
|
-
export interface CompletionRT extends Partial<CommonLogInfo> {
|
|
123
|
-
isReceive?: boolean;
|
|
124
|
-
isStop?: boolean;
|
|
125
|
-
completionNum?: number;
|
|
126
|
-
renderingTime?: number;
|
|
127
|
-
}
|
|
128
|
-
export interface MergeConflictRT extends Partial<CommonLogInfo> {
|
|
129
|
-
editorMode: '3way' | 'traditional';
|
|
130
|
-
conflictPointNum: number;
|
|
131
|
-
useAiConflictPointNum: number;
|
|
132
|
-
receiveNum: number;
|
|
133
|
-
clickNum: number;
|
|
134
|
-
clickAllNum: number;
|
|
135
|
-
aiOutputNum: number;
|
|
136
|
-
cancelNum: number;
|
|
137
|
-
}
|
|
138
|
-
export type ReportInfo = Partial<CommonLogInfo> | ({
|
|
139
|
-
type: AISerivceType.GPT;
|
|
140
|
-
} & QuestionRT) | ({
|
|
141
|
-
type: AISerivceType.Explain;
|
|
142
|
-
} & QuestionRT) | ({
|
|
143
|
-
type: AISerivceType.SearchCode;
|
|
144
|
-
} & QuestionRT) | ({
|
|
145
|
-
type: AISerivceType.SearchDoc;
|
|
146
|
-
} & QuestionRT) | ({
|
|
147
|
-
type: AISerivceType.Test;
|
|
148
|
-
} & QuestionRT) | ({
|
|
149
|
-
type: AISerivceType.Optimize;
|
|
150
|
-
} & CodeRT) | ({
|
|
151
|
-
type: AISerivceType.Generate;
|
|
152
|
-
} & GenerateRT) | ({
|
|
153
|
-
type: AISerivceType.Sumi;
|
|
154
|
-
} & CommandRT) | ({
|
|
155
|
-
type: AISerivceType.Run;
|
|
156
|
-
} & RunRT) | ({
|
|
157
|
-
type: AISerivceType.Completion;
|
|
158
|
-
} & CompletionRT) | ({
|
|
159
|
-
type: AISerivceType.MergeConflict;
|
|
160
|
-
} & MergeConflictRT);
|
|
161
|
-
export declare const IAIReporter: unique symbol;
|
|
162
|
-
export interface IAIReporter {
|
|
163
|
-
getCommonReportInfo(): Record<string, unknown>;
|
|
164
|
-
getCacheReportInfo<T = ReportInfo>(relationId: string): T | undefined;
|
|
165
|
-
record(data: ReportInfo, relationId?: string): ReportInfo;
|
|
166
|
-
start(msg: string, data: ReportInfo): string;
|
|
167
|
-
end(relationId: string, data: ReportInfo): void;
|
|
69
|
+
export declare class ReplyResponse {
|
|
70
|
+
readonly message: string;
|
|
71
|
+
constructor(message: string);
|
|
72
|
+
static is(response: any): boolean;
|
|
73
|
+
}
|
|
74
|
+
export declare class ErrorResponse {
|
|
75
|
+
readonly error: any;
|
|
76
|
+
readonly message?: string | undefined;
|
|
77
|
+
constructor(error: any, message?: string | undefined);
|
|
78
|
+
static is(response: any): boolean;
|
|
79
|
+
}
|
|
80
|
+
export declare class CancelResponse {
|
|
81
|
+
readonly message?: string | undefined;
|
|
82
|
+
readonly cancellation: boolean;
|
|
83
|
+
constructor(message?: string | undefined);
|
|
84
|
+
static is(response: any): boolean;
|
|
85
|
+
}
|
|
86
|
+
export type ChatResponse = ReplyResponse | ErrorResponse | CancelResponse;
|
|
87
|
+
/**
|
|
88
|
+
* DI Token
|
|
89
|
+
*/
|
|
90
|
+
export declare const InlineChatFeatureRegistryToken: unique symbol;
|
|
91
|
+
export declare const ChatFeatureRegistryToken: unique symbol;
|
|
92
|
+
export declare const ResolveConflictRegistryToken: unique symbol;
|
|
93
|
+
export declare const ChatAgentViewServiceToken: unique symbol;
|
|
94
|
+
/**
|
|
95
|
+
* Contribute Registry
|
|
96
|
+
*/
|
|
97
|
+
export interface IConflictContentMetadata {
|
|
98
|
+
current: string;
|
|
99
|
+
base: string;
|
|
100
|
+
incoming: string;
|
|
101
|
+
}
|
|
102
|
+
export interface IResolveConflictHandler {
|
|
103
|
+
providerRequest: (contentMetadata: IConflictContentMetadata, options: {
|
|
104
|
+
isRegenerate: boolean;
|
|
105
|
+
}, token: CancellationToken) => MaybePromise<ReplyResponse | ErrorResponse | CancelResponse>;
|
|
106
|
+
}
|
|
107
|
+
export interface IInternalResolveConflictRegistry {
|
|
108
|
+
getThreeWayHandler(): IResolveConflictHandler | undefined;
|
|
109
|
+
getTraditionalHandler(): IResolveConflictHandler | undefined;
|
|
168
110
|
}
|
|
169
111
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/ai-native/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/ai-native/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,Y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,CAAC,QAAQ,EAAE,GAAG,GAAG,OAAO;CAGlC;AAED,qBAAa,cAAc;IAGb,QAAQ,CAAC,OAAO,CAAC;IAF7B,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAQ;gBAEjB,OAAO,CAAC,oBAAQ;IAErC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,GAAG,OAAO;CAGlC;AAED,MAAM,MAAM,YAAY,GAAG,aAAa,GAAG,aAAa,GAAG,cAAc,CAAC;AAE1E;;GAEG;AACH,eAAO,MAAM,8BAA8B,eAA2C,CAAC;AACvF,eAAO,MAAM,wBAAwB,eAAqC,CAAC;AAC3E,eAAO,MAAM,4BAA4B,eAAyC,CAAC;AAEnF,eAAO,MAAM,yBAAyB,eAAsC,CAAC;AAE7E;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,WAAW,uBAAuB;IACtC,eAAe,EAAE,CACf,eAAe,EAAE,wBAAwB,EACzC,OAAO,EAAE;QAAE,YAAY,EAAE,OAAO,CAAA;KAAE,EAClC,KAAK,EAAE,iBAAiB,KACrB,YAAY,CAAC,aAAa,GAAG,aAAa,GAAG,cAAc,CAAC,CAAC;CACnE;AACD,MAAM,WAAW,gCAAgC;IAC/C,kBAAkB,IAAI,uBAAuB,GAAG,SAAS,CAAC;IAC1D,qBAAqB,IAAI,uBAAuB,GAAG,SAAS,CAAC;CAC9D"}
|
|
@@ -1,23 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ChatAgentViewServiceToken = exports.ResolveConflictRegistryToken = exports.ChatFeatureRegistryToken = exports.InlineChatFeatureRegistryToken = exports.CancelResponse = exports.ErrorResponse = exports.ReplyResponse = exports.AIBackSerivcePath = exports.AIBackSerivceToken = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
tslib_1.__exportStar(require("./reporter"), exports);
|
|
4
6
|
exports.AIBackSerivceToken = Symbol('AIBackSerivceToken');
|
|
5
7
|
exports.AIBackSerivcePath = 'AIBackSerivcePath';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
8
|
+
class ReplyResponse {
|
|
9
|
+
constructor(message) {
|
|
10
|
+
this.message = message;
|
|
11
|
+
}
|
|
12
|
+
static is(response) {
|
|
13
|
+
return response instanceof ReplyResponse || (typeof response === 'object' && response.message !== undefined);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.ReplyResponse = ReplyResponse;
|
|
17
|
+
class ErrorResponse {
|
|
18
|
+
constructor(error, message) {
|
|
19
|
+
this.error = error;
|
|
20
|
+
this.message = message;
|
|
21
|
+
}
|
|
22
|
+
static is(response) {
|
|
23
|
+
return response instanceof ErrorResponse || (typeof response === 'object' && response.error !== undefined);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.ErrorResponse = ErrorResponse;
|
|
27
|
+
class CancelResponse {
|
|
28
|
+
constructor(message) {
|
|
29
|
+
this.message = message;
|
|
30
|
+
this.cancellation = true;
|
|
31
|
+
}
|
|
32
|
+
static is(response) {
|
|
33
|
+
return response instanceof CancelResponse || (typeof response === 'object' && response.cancellation !== undefined);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.CancelResponse = CancelResponse;
|
|
37
|
+
/**
|
|
38
|
+
* DI Token
|
|
39
|
+
*/
|
|
40
|
+
exports.InlineChatFeatureRegistryToken = Symbol('InlineChatFeatureRegistryToken');
|
|
41
|
+
exports.ChatFeatureRegistryToken = Symbol('ChatFeatureRegistryToken');
|
|
42
|
+
exports.ResolveConflictRegistryToken = Symbol('ResolveConflictRegistryToken');
|
|
43
|
+
exports.ChatAgentViewServiceToken = Symbol('ChatAgentViewServiceToken');
|
|
23
44
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/ai-native/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/ai-native/index.ts"],"names":[],"mappings":";;;;AAGA,qDAA2B;AAuCd,QAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC;AAClD,QAAA,iBAAiB,GAAG,mBAAmB,CAAC;AA+CrD,MAAa,aAAa;IACxB,YAAqB,OAAe;QAAf,YAAO,GAAP,OAAO,CAAQ;IAAG,CAAC;IAExC,MAAM,CAAC,EAAE,CAAC,QAAa;QACrB,OAAO,QAAQ,YAAY,aAAa,IAAI,CAAC,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC;IAC/G,CAAC;CACF;AAND,sCAMC;AAED,MAAa,aAAa;IACxB,YAAqB,KAAU,EAAW,OAAgB;QAArC,UAAK,GAAL,KAAK,CAAK;QAAW,YAAO,GAAP,OAAO,CAAS;IAAG,CAAC;IAE9D,MAAM,CAAC,EAAE,CAAC,QAAa;QACrB,OAAO,QAAQ,YAAY,aAAa,IAAI,CAAC,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC;IAC7G,CAAC;CACF;AAND,sCAMC;AAED,MAAa,cAAc;IAGzB,YAAqB,OAAgB;QAAhB,YAAO,GAAP,OAAO,CAAS;QAF5B,iBAAY,GAAY,IAAI,CAAC;IAEE,CAAC;IAEzC,MAAM,CAAC,EAAE,CAAC,QAAa;QACrB,OAAO,QAAQ,YAAY,cAAc,IAAI,CAAC,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC;IACrH,CAAC;CACF;AARD,wCAQC;AAID;;GAEG;AACU,QAAA,8BAA8B,GAAG,MAAM,CAAC,gCAAgC,CAAC,CAAC;AAC1E,QAAA,wBAAwB,GAAG,MAAM,CAAC,0BAA0B,CAAC,CAAC;AAC9D,QAAA,4BAA4B,GAAG,MAAM,CAAC,8BAA8B,CAAC,CAAC;AAEtE,QAAA,yBAAyB,GAAG,MAAM,CAAC,2BAA2B,CAAC,CAAC"}
|
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
export declare const AI_REPORTER_NAME = "AI";
|
|
2
2
|
export declare enum AISerivceType {
|
|
3
|
-
|
|
4
|
-
SearchCode = "searchCode",
|
|
5
|
-
Sumi = "sumi",
|
|
6
|
-
GPT = "chat",
|
|
7
|
-
Explain = "explain",
|
|
8
|
-
Run = "run",
|
|
9
|
-
Test = "test",
|
|
10
|
-
Optimize = "optimize",
|
|
11
|
-
Generate = "generate",
|
|
3
|
+
Chat = "chat",
|
|
12
4
|
Completion = "completion",
|
|
13
5
|
Agent = "agent",
|
|
14
6
|
MergeConflict = "mergeConflict"
|
|
15
7
|
}
|
|
16
8
|
export interface CommonLogInfo {
|
|
17
|
-
msgType: AISerivceType;
|
|
9
|
+
msgType: AISerivceType | string;
|
|
18
10
|
relationId: string;
|
|
19
11
|
replytime: number;
|
|
20
12
|
success: boolean;
|
|
@@ -26,33 +18,26 @@ export interface CommonLogInfo {
|
|
|
26
18
|
copy: boolean;
|
|
27
19
|
insert: boolean;
|
|
28
20
|
}
|
|
29
|
-
export interface QuestionRT extends Partial<CommonLogInfo> {
|
|
30
|
-
isRetry: boolean;
|
|
31
|
-
isStop: boolean;
|
|
32
|
-
}
|
|
33
|
-
export interface CodeRT extends Partial<CommonLogInfo> {
|
|
34
|
-
isReceive: boolean;
|
|
35
|
-
isDrop: boolean;
|
|
36
|
-
}
|
|
37
|
-
export interface GenerateRT extends Partial<CommonLogInfo> {
|
|
38
|
-
fileCount: number;
|
|
39
|
-
requirment: string;
|
|
40
|
-
}
|
|
41
|
-
export interface CommandRT extends Partial<CommonLogInfo> {
|
|
42
|
-
useCommand: boolean;
|
|
43
|
-
useCommandSuccess: boolean;
|
|
44
|
-
}
|
|
45
|
-
export interface RunRT extends Partial<CommonLogInfo> {
|
|
46
|
-
runSuccess: boolean;
|
|
47
|
-
}
|
|
48
21
|
export interface CompletionRT extends Partial<CommonLogInfo> {
|
|
49
22
|
isReceive?: boolean;
|
|
50
23
|
isStop?: boolean;
|
|
51
24
|
completionNum?: number;
|
|
52
25
|
renderingTime?: number;
|
|
53
26
|
}
|
|
27
|
+
export interface IAIReportCompletionOption {
|
|
28
|
+
relationId: string;
|
|
29
|
+
sessionId: string;
|
|
30
|
+
accept: boolean;
|
|
31
|
+
repo?: string;
|
|
32
|
+
completionUseTime?: number;
|
|
33
|
+
renderingTime?: number;
|
|
34
|
+
}
|
|
35
|
+
export declare enum MergeConflictEditorMode {
|
|
36
|
+
'3way' = "3way",
|
|
37
|
+
'traditional' = "traditional"
|
|
38
|
+
}
|
|
54
39
|
export interface MergeConflictRT extends Partial<CommonLogInfo> {
|
|
55
|
-
editorMode:
|
|
40
|
+
editorMode: MergeConflictEditorMode;
|
|
56
41
|
conflictPointNum: number;
|
|
57
42
|
useAiConflictPointNum: number;
|
|
58
43
|
receiveNum: number;
|
|
@@ -62,24 +47,6 @@ export interface MergeConflictRT extends Partial<CommonLogInfo> {
|
|
|
62
47
|
cancelNum: number;
|
|
63
48
|
}
|
|
64
49
|
export type ReportInfo = Partial<CommonLogInfo> | ({
|
|
65
|
-
type: AISerivceType.GPT;
|
|
66
|
-
} & QuestionRT) | ({
|
|
67
|
-
type: AISerivceType.Explain;
|
|
68
|
-
} & QuestionRT) | ({
|
|
69
|
-
type: AISerivceType.SearchCode;
|
|
70
|
-
} & QuestionRT) | ({
|
|
71
|
-
type: AISerivceType.SearchDoc;
|
|
72
|
-
} & QuestionRT) | ({
|
|
73
|
-
type: AISerivceType.Test;
|
|
74
|
-
} & QuestionRT) | ({
|
|
75
|
-
type: AISerivceType.Optimize;
|
|
76
|
-
} & CodeRT) | ({
|
|
77
|
-
type: AISerivceType.Generate;
|
|
78
|
-
} & GenerateRT) | ({
|
|
79
|
-
type: AISerivceType.Sumi;
|
|
80
|
-
} & CommandRT) | ({
|
|
81
|
-
type: AISerivceType.Run;
|
|
82
|
-
} & RunRT) | ({
|
|
83
50
|
type: AISerivceType.Completion;
|
|
84
51
|
} & CompletionRT) | ({
|
|
85
52
|
type: AISerivceType.MergeConflict;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reporter.d.ts","sourceRoot":"","sources":["../../../src/types/ai-native/reporter.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,OAAO,CAAC;AAErC,oBAAY,aAAa;IACvB,
|
|
1
|
+
{"version":3,"file":"reporter.d.ts","sourceRoot":"","sources":["../../../src/types/ai-native/reporter.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,OAAO,CAAC;AAErC,oBAAY,aAAa;IACvB,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,KAAK,UAAU;IACf,aAAa,kBAAkB;CAChC;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,aAAa,GAAG,MAAM,CAAC;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAEhB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,YAAa,SAAQ,OAAO,CAAC,aAAa,CAAC;IAC1D,SAAS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,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAE1D,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC;IAC7C,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;CACjD"}
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IAIReporter = exports.AISerivceType = exports.AI_REPORTER_NAME = void 0;
|
|
3
|
+
exports.IAIReporter = exports.MergeConflictEditorMode = exports.AISerivceType = exports.AI_REPORTER_NAME = void 0;
|
|
4
4
|
exports.AI_REPORTER_NAME = 'AI';
|
|
5
5
|
var AISerivceType;
|
|
6
6
|
(function (AISerivceType) {
|
|
7
|
-
AISerivceType["
|
|
8
|
-
AISerivceType["SearchCode"] = "searchCode";
|
|
9
|
-
AISerivceType["Sumi"] = "sumi";
|
|
10
|
-
AISerivceType["GPT"] = "chat";
|
|
11
|
-
AISerivceType["Explain"] = "explain";
|
|
12
|
-
AISerivceType["Run"] = "run";
|
|
13
|
-
AISerivceType["Test"] = "test";
|
|
14
|
-
AISerivceType["Optimize"] = "optimize";
|
|
15
|
-
AISerivceType["Generate"] = "generate";
|
|
7
|
+
AISerivceType["Chat"] = "chat";
|
|
16
8
|
AISerivceType["Completion"] = "completion";
|
|
17
9
|
AISerivceType["Agent"] = "agent";
|
|
18
10
|
AISerivceType["MergeConflict"] = "mergeConflict";
|
|
19
11
|
})(AISerivceType = exports.AISerivceType || (exports.AISerivceType = {}));
|
|
12
|
+
var MergeConflictEditorMode;
|
|
13
|
+
(function (MergeConflictEditorMode) {
|
|
14
|
+
MergeConflictEditorMode["3way"] = "3way";
|
|
15
|
+
MergeConflictEditorMode["traditional"] = "traditional";
|
|
16
|
+
})(MergeConflictEditorMode = exports.MergeConflictEditorMode || (exports.MergeConflictEditorMode = {}));
|
|
20
17
|
exports.IAIReporter = Symbol('IAIReporter');
|
|
21
18
|
//# sourceMappingURL=reporter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reporter.js","sourceRoot":"","sources":["../../../src/types/ai-native/reporter.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG,IAAI,CAAC;AAErC,IAAY,
|
|
1
|
+
{"version":3,"file":"reporter.js","sourceRoot":"","sources":["../../../src/types/ai-native/reporter.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG,IAAI,CAAC;AAErC,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,8BAAa,CAAA;IACb,0CAAyB,CAAA;IACzB,gCAAe,CAAA;IACf,gDAA+B,CAAA;AACjC,CAAC,EALW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAKxB;AAoCD,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,wCAAe,CAAA;IACf,sDAA6B,CAAA;AAC/B,CAAC,EAHW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAGlC;AA0BY,QAAA,WAAW,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opensumi/ide-core-common",
|
|
3
|
-
"version": "2.27.3-next-
|
|
3
|
+
"version": "2.27.3-next-1710911932.0",
|
|
4
4
|
"description": "@opensumi/ide-core-common",
|
|
5
5
|
"files": [
|
|
6
6
|
"lib",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@opensumi/di": "^1.4.0",
|
|
22
|
-
"@opensumi/ide-utils": "2.27.3-next-
|
|
22
|
+
"@opensumi/ide-utils": "2.27.3-next-1710911932.0",
|
|
23
23
|
"jschardet": "3.0.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@opensumi/ide-dev-tool": "1.3.1"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "c3221a7ee1f0b6ee51fb114890381d6bcb42fe6b"
|
|
29
29
|
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import { CancellationToken } from '../../utils';
|
|
1
|
+
import { CancellationToken, MaybePromise } from '../../utils';
|
|
2
|
+
|
|
3
|
+
import { IAIReportCompletionOption } from './reporter';
|
|
4
|
+
export * from './reporter';
|
|
2
5
|
|
|
3
6
|
export interface IAINativeCapabilities {
|
|
4
7
|
/**
|
|
@@ -62,15 +65,6 @@ export interface IAICompletionOption {
|
|
|
62
65
|
sessionId?: string;
|
|
63
66
|
}
|
|
64
67
|
|
|
65
|
-
export interface IAIReportCompletionOption {
|
|
66
|
-
relationId: string;
|
|
67
|
-
sessionId: string;
|
|
68
|
-
accept: boolean;
|
|
69
|
-
repo?: string;
|
|
70
|
-
completionUseTime?: number;
|
|
71
|
-
renderingTime?: number;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
68
|
export interface IAIBackService<
|
|
75
69
|
BaseResponse extends IAIBackServiceResponse = IAIBackServiceResponse,
|
|
76
70
|
StreamResponse extends NodeJS.ReadableStream = NodeJS.ReadableStream,
|
|
@@ -94,112 +88,59 @@ export interface IAIBackService<
|
|
|
94
88
|
destroyStreamRequest?: (sessionId: string) => Promise<void>;
|
|
95
89
|
}
|
|
96
90
|
|
|
97
|
-
export
|
|
98
|
-
|
|
99
|
-
export enum AISerivceType {
|
|
100
|
-
SearchDoc = 'searchDoc',
|
|
101
|
-
SearchCode = 'searchCode',
|
|
102
|
-
Sumi = 'sumi',
|
|
103
|
-
GPT = 'chat',
|
|
104
|
-
Explain = 'explain',
|
|
105
|
-
Run = 'run',
|
|
106
|
-
Test = 'test',
|
|
107
|
-
Optimize = 'optimize',
|
|
108
|
-
Generate = 'generate',
|
|
109
|
-
Completion = 'completion',
|
|
110
|
-
Agent = 'agent',
|
|
111
|
-
MergeConflict = 'mergeConflict',
|
|
112
|
-
}
|
|
91
|
+
export class ReplyResponse {
|
|
92
|
+
constructor(readonly message: string) {}
|
|
113
93
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
replytime: number;
|
|
118
|
-
success: boolean;
|
|
119
|
-
message: string;
|
|
120
|
-
isStart: boolean;
|
|
121
|
-
isLike: boolean;
|
|
122
|
-
// 是否有效
|
|
123
|
-
isValid: boolean;
|
|
124
|
-
model: string;
|
|
125
|
-
copy: boolean;
|
|
126
|
-
insert: boolean;
|
|
94
|
+
static is(response: any): boolean {
|
|
95
|
+
return response instanceof ReplyResponse || (typeof response === 'object' && response.message !== undefined);
|
|
96
|
+
}
|
|
127
97
|
}
|
|
128
98
|
|
|
129
|
-
export
|
|
130
|
-
|
|
131
|
-
isStop: boolean;
|
|
132
|
-
}
|
|
99
|
+
export class ErrorResponse {
|
|
100
|
+
constructor(readonly error: any, readonly message?: string) {}
|
|
133
101
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
102
|
+
static is(response: any): boolean {
|
|
103
|
+
return response instanceof ErrorResponse || (typeof response === 'object' && response.error !== undefined);
|
|
104
|
+
}
|
|
137
105
|
}
|
|
138
106
|
|
|
139
|
-
export
|
|
140
|
-
|
|
141
|
-
requirment: string;
|
|
142
|
-
}
|
|
107
|
+
export class CancelResponse {
|
|
108
|
+
readonly cancellation: boolean = true;
|
|
143
109
|
|
|
144
|
-
|
|
145
|
-
useCommand: boolean;
|
|
146
|
-
useCommandSuccess: boolean;
|
|
147
|
-
}
|
|
110
|
+
constructor(readonly message?: string) {}
|
|
148
111
|
|
|
149
|
-
|
|
150
|
-
|
|
112
|
+
static is(response: any): boolean {
|
|
113
|
+
return response instanceof CancelResponse || (typeof response === 'object' && response.cancellation !== undefined);
|
|
114
|
+
}
|
|
151
115
|
}
|
|
152
116
|
|
|
153
|
-
export
|
|
154
|
-
isReceive?: boolean;
|
|
155
|
-
// 是否取消
|
|
156
|
-
isStop?: boolean;
|
|
157
|
-
// 补全条数
|
|
158
|
-
completionNum?: number;
|
|
159
|
-
// 渲染时长
|
|
160
|
-
renderingTime?: number;
|
|
161
|
-
}
|
|
117
|
+
export type ChatResponse = ReplyResponse | ErrorResponse | CancelResponse;
|
|
162
118
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
useAiConflictPointNum: number;
|
|
170
|
-
// 被用户采纳了的冲突点数量
|
|
171
|
-
receiveNum: number;
|
|
172
|
-
// 点击了 ai 解决冲突的数量
|
|
173
|
-
clickNum: number;
|
|
174
|
-
// 点击了一键解决的次数
|
|
175
|
-
clickAllNum: number;
|
|
176
|
-
// ai 成功输出了的数量
|
|
177
|
-
aiOutputNum: number;
|
|
178
|
-
// 取消次数
|
|
179
|
-
cancelNum: number;
|
|
180
|
-
}
|
|
119
|
+
/**
|
|
120
|
+
* DI Token
|
|
121
|
+
*/
|
|
122
|
+
export const InlineChatFeatureRegistryToken = Symbol('InlineChatFeatureRegistryToken');
|
|
123
|
+
export const ChatFeatureRegistryToken = Symbol('ChatFeatureRegistryToken');
|
|
124
|
+
export const ResolveConflictRegistryToken = Symbol('ResolveConflictRegistryToken');
|
|
181
125
|
|
|
182
|
-
export
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
// 返回关联 ID
|
|
203
|
-
start(msg: string, data: ReportInfo): string;
|
|
204
|
-
end(relationId: string, data: ReportInfo): void;
|
|
126
|
+
export const ChatAgentViewServiceToken = Symbol('ChatAgentViewServiceToken');
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Contribute Registry
|
|
130
|
+
*/
|
|
131
|
+
export interface IConflictContentMetadata {
|
|
132
|
+
current: string;
|
|
133
|
+
base: string;
|
|
134
|
+
incoming: string;
|
|
135
|
+
}
|
|
136
|
+
export interface IResolveConflictHandler {
|
|
137
|
+
providerRequest: (
|
|
138
|
+
contentMetadata: IConflictContentMetadata,
|
|
139
|
+
options: { isRegenerate: boolean },
|
|
140
|
+
token: CancellationToken,
|
|
141
|
+
) => MaybePromise<ReplyResponse | ErrorResponse | CancelResponse>;
|
|
142
|
+
}
|
|
143
|
+
export interface IInternalResolveConflictRegistry {
|
|
144
|
+
getThreeWayHandler(): IResolveConflictHandler | undefined;
|
|
145
|
+
getTraditionalHandler(): IResolveConflictHandler | undefined;
|
|
205
146
|
}
|
|
@@ -1,22 +1,14 @@
|
|
|
1
1
|
export const AI_REPORTER_NAME = 'AI';
|
|
2
2
|
|
|
3
3
|
export enum AISerivceType {
|
|
4
|
-
|
|
5
|
-
SearchCode = 'searchCode',
|
|
6
|
-
Sumi = 'sumi',
|
|
7
|
-
GPT = 'chat',
|
|
8
|
-
Explain = 'explain',
|
|
9
|
-
Run = 'run',
|
|
10
|
-
Test = 'test',
|
|
11
|
-
Optimize = 'optimize',
|
|
12
|
-
Generate = 'generate',
|
|
4
|
+
Chat = 'chat',
|
|
13
5
|
Completion = 'completion',
|
|
14
6
|
Agent = 'agent',
|
|
15
7
|
MergeConflict = 'mergeConflict',
|
|
16
8
|
}
|
|
17
9
|
|
|
18
10
|
export interface CommonLogInfo {
|
|
19
|
-
msgType: AISerivceType;
|
|
11
|
+
msgType: AISerivceType | string;
|
|
20
12
|
relationId: string;
|
|
21
13
|
replytime: number;
|
|
22
14
|
success: boolean;
|
|
@@ -30,30 +22,6 @@ export interface CommonLogInfo {
|
|
|
30
22
|
insert: boolean;
|
|
31
23
|
}
|
|
32
24
|
|
|
33
|
-
export interface QuestionRT extends Partial<CommonLogInfo> {
|
|
34
|
-
isRetry: boolean;
|
|
35
|
-
isStop: boolean;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export interface CodeRT extends Partial<CommonLogInfo> {
|
|
39
|
-
isReceive: boolean;
|
|
40
|
-
isDrop: boolean;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface GenerateRT extends Partial<CommonLogInfo> {
|
|
44
|
-
fileCount: number;
|
|
45
|
-
requirment: string;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface CommandRT extends Partial<CommonLogInfo> {
|
|
49
|
-
useCommand: boolean;
|
|
50
|
-
useCommandSuccess: boolean;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export interface RunRT extends Partial<CommonLogInfo> {
|
|
54
|
-
runSuccess: boolean;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
25
|
export interface CompletionRT extends Partial<CommonLogInfo> {
|
|
58
26
|
isReceive?: boolean;
|
|
59
27
|
// 是否取消
|
|
@@ -64,9 +32,23 @@ export interface CompletionRT extends Partial<CommonLogInfo> {
|
|
|
64
32
|
renderingTime?: number;
|
|
65
33
|
}
|
|
66
34
|
|
|
35
|
+
export interface IAIReportCompletionOption {
|
|
36
|
+
relationId: string;
|
|
37
|
+
sessionId: string;
|
|
38
|
+
accept: boolean;
|
|
39
|
+
repo?: string;
|
|
40
|
+
completionUseTime?: number;
|
|
41
|
+
renderingTime?: number;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export enum MergeConflictEditorMode {
|
|
45
|
+
'3way' = '3way',
|
|
46
|
+
'traditional' = 'traditional',
|
|
47
|
+
}
|
|
48
|
+
|
|
67
49
|
export interface MergeConflictRT extends Partial<CommonLogInfo> {
|
|
68
50
|
// 解决冲突模式 (3-way 或 传统模式)
|
|
69
|
-
editorMode:
|
|
51
|
+
editorMode: MergeConflictEditorMode;
|
|
70
52
|
// 冲突点数量(仅包含 AI 冲突点)
|
|
71
53
|
conflictPointNum: number;
|
|
72
54
|
// 使用了 ai 处理的冲突点数量
|
|
@@ -85,15 +67,6 @@ export interface MergeConflictRT extends Partial<CommonLogInfo> {
|
|
|
85
67
|
|
|
86
68
|
export type ReportInfo =
|
|
87
69
|
| Partial<CommonLogInfo>
|
|
88
|
-
| ({ type: AISerivceType.GPT } & QuestionRT)
|
|
89
|
-
| ({ type: AISerivceType.Explain } & QuestionRT)
|
|
90
|
-
| ({ type: AISerivceType.SearchCode } & QuestionRT)
|
|
91
|
-
| ({ type: AISerivceType.SearchDoc } & QuestionRT)
|
|
92
|
-
| ({ type: AISerivceType.Test } & QuestionRT)
|
|
93
|
-
| ({ type: AISerivceType.Optimize } & CodeRT)
|
|
94
|
-
| ({ type: AISerivceType.Generate } & GenerateRT)
|
|
95
|
-
| ({ type: AISerivceType.Sumi } & CommandRT)
|
|
96
|
-
| ({ type: AISerivceType.Run } & RunRT)
|
|
97
70
|
| ({ type: AISerivceType.Completion } & CompletionRT)
|
|
98
71
|
| ({ type: AISerivceType.MergeConflict } & MergeConflictRT);
|
|
99
72
|
|