@theia/ai-history 1.58.3 → 1.59.0-next.72
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/browser/ai-history-communication-card.d.ts.map +1 -1
- package/lib/browser/ai-history-communication-card.js +18 -12
- package/lib/browser/ai-history-communication-card.js.map +1 -1
- package/lib/browser/ai-history-contribution.d.ts.map +1 -1
- package/lib/browser/ai-history-contribution.js +3 -3
- package/lib/browser/ai-history-contribution.js.map +1 -1
- package/lib/browser/ai-history-frontend-module.d.ts.map +1 -1
- package/lib/browser/ai-history-frontend-module.js +0 -5
- package/lib/browser/ai-history-frontend-module.js.map +1 -1
- package/lib/browser/ai-history-widget.d.ts.map +1 -1
- package/lib/browser/ai-history-widget.js +4 -7
- package/lib/browser/ai-history-widget.js.map +1 -1
- package/package.json +8 -8
- package/src/browser/ai-history-communication-card.tsx +11 -9
- package/src/browser/ai-history-contribution.ts +4 -4
- package/src/browser/ai-history-frontend-module.ts +0 -6
- package/src/browser/ai-history-widget.tsx +7 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-history-communication-card.d.ts","sourceRoot":"","sources":["../../src/browser/ai-history-communication-card.tsx"],"names":[],"mappings":";AAeA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"ai-history-communication-card.d.ts","sourceRoot":"","sources":["../../src/browser/ai-history-communication-card.tsx"],"names":[],"mappings":";AAeA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAC;AAElD,MAAM,WAAW,sBAAsB;IACnC,KAAK,EAAE,yBAAyB,CAAC;CACpC;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAiD9D,CAAC"}
|
|
@@ -1,40 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CommunicationCard = void 0;
|
|
4
|
+
const core_1 = require("@theia/core");
|
|
4
5
|
const React = require("@theia/core/shared/react");
|
|
5
6
|
const CommunicationCard = ({ entry }) => (React.createElement("div", { className: 'theia-card' },
|
|
6
7
|
React.createElement("div", { className: 'theia-card-meta' },
|
|
7
8
|
React.createElement("span", { className: 'theia-card-request-id' },
|
|
8
|
-
|
|
9
|
+
core_1.nls.localize('theia/ai/history/communication-card/requestId', 'Request ID'),
|
|
10
|
+
": ",
|
|
9
11
|
entry.requestId),
|
|
10
12
|
React.createElement("span", { className: 'theia-card-session-id' },
|
|
11
|
-
|
|
13
|
+
core_1.nls.localize('theia/ai/history/communication-card/sessionId', 'Session ID'),
|
|
14
|
+
": ",
|
|
12
15
|
entry.sessionId)),
|
|
13
16
|
React.createElement("div", { className: 'theia-card-content' },
|
|
14
17
|
entry.request && (React.createElement("div", { className: 'theia-card-request' },
|
|
15
|
-
React.createElement("h2", null,
|
|
18
|
+
React.createElement("h2", null, core_1.nls.localize('theia/ai/history/communication-card/request', 'Request')),
|
|
16
19
|
React.createElement("pre", null, entry.request))),
|
|
17
20
|
entry.response && (React.createElement("div", { className: 'theia-card-response' },
|
|
18
|
-
React.createElement("h2", null,
|
|
21
|
+
React.createElement("h2", null, core_1.nls.localize('theia/ai/history/communication-card/response', 'Response')),
|
|
19
22
|
React.createElement("pre", null, entry.response))),
|
|
20
23
|
(entry.systemMessage || (entry.messages && entry.messages.length > 0)) && (React.createElement("div", { className: 'theia-card-context' },
|
|
21
24
|
React.createElement("details", null,
|
|
22
25
|
React.createElement("summary", null,
|
|
23
|
-
React.createElement("h2", null,
|
|
26
|
+
React.createElement("h2", null, core_1.nls.localize('theia/ai/history/communication-card/context', 'Context'))),
|
|
24
27
|
(entry.systemMessage && (React.createElement("div", { className: 'theia-context-system-message' },
|
|
25
|
-
React.createElement("h3", null,
|
|
28
|
+
React.createElement("h3", null, core_1.nls.localize('theia/ai/history/communication-card/systemMessage', 'System Message')),
|
|
26
29
|
React.createElement("pre", null, entry.systemMessage)))),
|
|
27
30
|
(entry.messages && entry.messages.length > 0) && (React.createElement("div", { className: 'theia-context-messages' },
|
|
28
|
-
React.createElement("h3", null,
|
|
31
|
+
React.createElement("h3", null, core_1.nls.localize('theia/ai/history/communication-card/messages', 'Messages')),
|
|
29
32
|
React.createElement("ul", null, entry.messages.map((message, index) => (React.createElement("li", { key: index },
|
|
30
33
|
React.createElement("pre", null, JSON.stringify(message, undefined, 2)))))))))))),
|
|
31
34
|
React.createElement("div", { className: 'theia-card-meta' },
|
|
32
35
|
React.createElement("span", { className: 'theia-card-timestamp' },
|
|
33
|
-
|
|
36
|
+
core_1.nls.localize('theia/ai/history/communication-card/timestamp', 'Timestamp'),
|
|
37
|
+
": ",
|
|
34
38
|
new Date(entry.timestamp).toLocaleString()),
|
|
35
|
-
entry.responseTime &&
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
entry.responseTime &&
|
|
40
|
+
React.createElement("span", { className: 'theia-card-response-time' },
|
|
41
|
+
core_1.nls.localize('theia/ai/history/communication-card/responseTime', 'Response Time'),
|
|
42
|
+
": ",
|
|
43
|
+
entry.responseTime,
|
|
44
|
+
"ms"))));
|
|
39
45
|
exports.CommunicationCard = CommunicationCard;
|
|
40
46
|
//# sourceMappingURL=ai-history-communication-card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-history-communication-card.js","sourceRoot":"","sources":["../../src/browser/ai-history-communication-card.tsx"],"names":[],"mappings":";;;AAgBA,kDAAkD;AAM3C,MAAM,iBAAiB,GAAqC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAC9E,6BAAK,SAAS,EAAC,YAAY;IACvB,6BAAK,SAAS,EAAC,iBAAiB;QAC5B,8BAAM,SAAS,EAAC,uBAAuB;;
|
|
1
|
+
{"version":3,"file":"ai-history-communication-card.js","sourceRoot":"","sources":["../../src/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O,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"ai-history-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/ai-history-contribution.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,mBAAmB,EAAW,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,EAAO,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AAGjH,eAAO,MAAM,4BAA4B,qBAAqB,CAAC;AAC/D,eAAO,MAAM,oBAAoB,SAG/B,CAAC;AAEH,eAAO,MAAM,oCAAoC,SAI/C,CAAC;AAEH,eAAO,MAAM,4CAA4C,SAIvD,CAAC;AAEH,eAAO,MAAM,qBAAqB,SAIhC,CAAC;AAEH,qBACa,yBAA0B,SAAQ,kBAAkB,CAAC,aAAa,CAAE,YAAW,yBAAyB;IAC1E,OAAO,CAAC,gBAAgB,CAAgC;IAE/F,SAAS,CAAC,QAAQ,CAAC,2BAA2B,gBAAuB;IACrE,SAAS,CAAC,QAAQ,CAAC,yBAAyB,oCAA0C;;IAchF,gBAAgB,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAIvD,gBAAgB,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;IAgCnD,YAAY,IAAI,IAAI;IAI3B,SAAS,CAAC,iBAAiB,CACvB,MAAM,GAAE,OAA6B,EACrC,SAAS,GAAE,CAAC,MAAM,EAAE,aAAa,KAAK,OAAoB,GAC3D,OAAO,GAAG,KAAK;IAIlB,oBAAoB,CAAC,QAAQ,EAAE,qBAAqB,GAAG,IAAI;CAsB9D"}
|
|
@@ -102,21 +102,21 @@ let AIHistoryViewContribution = class AIHistoryViewContribution extends browser_
|
|
|
102
102
|
registry.registerItem({
|
|
103
103
|
id: exports.AI_HISTORY_VIEW_SORT_CHRONOLOGICALLY.id,
|
|
104
104
|
command: exports.AI_HISTORY_VIEW_SORT_CHRONOLOGICALLY.id,
|
|
105
|
-
tooltip: 'Sort chronologically',
|
|
105
|
+
tooltip: core_1.nls.localize('theia/ai/history/sortChronologically/tooltip', 'Sort chronologically'),
|
|
106
106
|
isVisible: widget => this.withHistoryWidget(widget),
|
|
107
107
|
onDidChange: this.chronologicalStateChanged
|
|
108
108
|
});
|
|
109
109
|
registry.registerItem({
|
|
110
110
|
id: exports.AI_HISTORY_VIEW_SORT_REVERSE_CHRONOLOGICALLY.id,
|
|
111
111
|
command: exports.AI_HISTORY_VIEW_SORT_REVERSE_CHRONOLOGICALLY.id,
|
|
112
|
-
tooltip: 'Sort reverse chronologically',
|
|
112
|
+
tooltip: core_1.nls.localize('theia/ai/history/sortReverseChronologically/tooltip', 'Sort reverse chronologically'),
|
|
113
113
|
isVisible: widget => this.withHistoryWidget(widget),
|
|
114
114
|
onDidChange: this.chronologicalStateChanged
|
|
115
115
|
});
|
|
116
116
|
registry.registerItem({
|
|
117
117
|
id: exports.AI_HISTORY_VIEW_CLEAR.id,
|
|
118
118
|
command: exports.AI_HISTORY_VIEW_CLEAR.id,
|
|
119
|
-
tooltip: 'Clear History of all agents',
|
|
119
|
+
tooltip: core_1.nls.localize('theia/ai/history/clear/tooltip', 'Clear History of all agents'),
|
|
120
120
|
isVisible: widget => this.withHistoryWidget(widget)
|
|
121
121
|
});
|
|
122
122
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-history-contribution.js","sourceRoot":"","sources":["../../src/browser/ai-history-contribution.ts"],"names":[],"mappings":";;;;AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAChF,qDAAuE;AACvE,wDAAgE;AAChE,4DAAkE;AAClE,2DAAoD;AACpD,
|
|
1
|
+
{"version":3,"file":"ai-history-contribution.js","sourceRoot":"","sources":["../../src/browser/ai-history-contribution.ts"],"names":[],"mappings":";;;;AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAChF,qDAAuE;AACvE,wDAAgE;AAChE,4DAAkE;AAClE,2DAAoD;AACpD,sCAAqE;AAErE,4CAA+D;AAElD,QAAA,4BAA4B,GAAG,kBAAkB,CAAC;AAClD,QAAA,oBAAoB,GAAG,cAAO,CAAC,kBAAkB,CAAC;IAC3D,EAAE,EAAE,gBAAgB;IACpB,KAAK,EAAE,sBAAsB;CAChC,CAAC,CAAC;AAEU,QAAA,oCAAoC,GAAG,cAAO,CAAC,kBAAkB,CAAC;IAC3E,EAAE,EAAE,+BAA+B;IACnC,KAAK,EAAE,kCAAkC;IACzC,SAAS,EAAE,IAAA,iBAAO,EAAC,YAAY,CAAC;CACnC,CAAC,CAAC;AAEU,QAAA,4CAA4C,GAAG,cAAO,CAAC,kBAAkB,CAAC;IACnF,EAAE,EAAE,sCAAsC;IAC1C,KAAK,EAAE,0CAA0C;IACjD,SAAS,EAAE,IAAA,iBAAO,EAAC,UAAU,CAAC;CACjC,CAAC,CAAC;AAEU,QAAA,qBAAqB,GAAG,cAAO,CAAC,kBAAkB,CAAC;IAC5D,EAAE,EAAE,iBAAiB;IACrB,KAAK,EAAE,2BAA2B;IAClC,SAAS,EAAE,IAAA,iBAAO,EAAC,WAAW,CAAC;CAClC,CAAC,CAAC;AAGI,IAAM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{"version":3,"file":"ai-history-frontend-module.d.ts","sourceRoot":"","sources":["../../src/browser/ai-history-frontend-module.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"ai-history-frontend-module.d.ts","sourceRoot":"","sources":["../../src/browser/ai-history-frontend-module.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAK/D,OAAO,wCAAwC,CAAC;;AAGhD,wBAaG"}
|
|
@@ -19,7 +19,6 @@ const ai_core_1 = require("@theia/ai-core");
|
|
|
19
19
|
const inversify_1 = require("@theia/core/shared/inversify");
|
|
20
20
|
const communication_recording_service_1 = require("../common/communication-recording-service");
|
|
21
21
|
const browser_1 = require("@theia/core/lib/browser");
|
|
22
|
-
const core_1 = require("@theia/core");
|
|
23
22
|
const ai_history_contribution_1 = require("./ai-history-contribution");
|
|
24
23
|
const ai_history_widget_1 = require("./ai-history-widget");
|
|
25
24
|
require("../../src/browser/style/ai-history.css");
|
|
@@ -27,10 +26,6 @@ const tab_bar_toolbar_1 = require("@theia/core/lib/browser/shell/tab-bar-toolbar
|
|
|
27
26
|
exports.default = new inversify_1.ContainerModule(bind => {
|
|
28
27
|
bind(communication_recording_service_1.DefaultCommunicationRecordingService).toSelf().inSingletonScope();
|
|
29
28
|
bind(ai_core_1.CommunicationRecordingService).toService(communication_recording_service_1.DefaultCommunicationRecordingService);
|
|
30
|
-
bind(core_1.ILogger).toDynamicValue(ctx => {
|
|
31
|
-
const parentLogger = ctx.container.get(core_1.ILogger);
|
|
32
|
-
return parentLogger.child('llm-communication-recorder');
|
|
33
|
-
}).inSingletonScope().whenTargetNamed('llm-communication-recorder');
|
|
34
29
|
(0, browser_1.bindViewContribution)(bind, ai_history_contribution_1.AIHistoryViewContribution);
|
|
35
30
|
bind(ai_history_widget_1.AIHistoryView).toSelf();
|
|
36
31
|
bind(browser_1.WidgetFactory).toDynamicValue(context => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-history-frontend-module.js","sourceRoot":"","sources":["../../src/browser/ai-history-frontend-module.ts"],"names":[],"mappings":";;AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAChF,4CAA+D;AAC/D,4DAA+D;AAC/D,+FAAiG;AACjG,qDAA8E;AAC9E,
|
|
1
|
+
{"version":3,"file":"ai-history-frontend-module.js","sourceRoot":"","sources":["../../src/browser/ai-history-frontend-module.ts"],"names":[],"mappings":";;AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAChF,4CAA+D;AAC/D,4DAA+D;AAC/D,+FAAiG;AACjG,qDAA8E;AAC9E,uEAAsE;AACtE,2DAAoD;AACpD,kDAAgD;AAChD,mFAA0F;AAE1F,kBAAe,IAAI,2BAAe,CAAC,IAAI,CAAC,EAAE;IACtC,IAAI,CAAC,sEAAoC,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACvE,IAAI,CAAC,uCAA6B,CAAC,CAAC,SAAS,CAAC,sEAAoC,CAAC,CAAC;IAEpF,IAAA,8BAAoB,EAAC,IAAI,EAAE,mDAAyB,CAAC,CAAC;IAEtD,IAAI,CAAC,iCAAa,CAAC,CAAC,MAAM,EAAE,CAAC;IAC7B,IAAI,CAAC,uBAAa,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC3C,EAAE,EAAE,iCAAa,CAAC,EAAE;QACpB,YAAY,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAgB,iCAAa,CAAC;KAC1E,CAAC,CAAC,CAAC,gBAAgB,EAAE,CAAC;IACvB,IAAI,CAAC,2CAAyB,CAAC,CAAC,SAAS,CAAC,mDAAyB,CAAC,CAAC;AAEzE,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-history-widget.d.ts","sourceRoot":"","sources":["../../src/browser/ai-history-widget.tsx"],"names":[],"mappings":";AAeA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,6BAA6B,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAC3I,OAAO,EAAW,WAAW,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE/E,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAC;AAKlD,kBAAU,aAAa,CAAC;IACpB,UAAiB,KAAK;QAClB,aAAa,EAAE,OAAO,CAAC;KAC1B;CACJ;AAED,qBACa,aAAc,SAAQ,WAAY,YAAW,cAAc;IAEpE,SAAS,CAAC,gBAAgB,EAAE,6BAA6B,CAAC;IAE1D,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IAE9C,OAAc,EAAE,SAAuB;IACvC,MAAM,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"ai-history-widget.d.ts","sourceRoot":"","sources":["../../src/browser/ai-history-widget.tsx"],"names":[],"mappings":";AAeA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,6BAA6B,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAC3I,OAAO,EAAW,WAAW,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE/E,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAC;AAKlD,kBAAU,aAAa,CAAC;IACpB,UAAiB,KA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
return (React.createElement("div", { className: 'agent-history-widget' },
|
|
81
|
-
React.createElement("div", { className: 'theia-card no-content' },
|
|
81
|
+
React.createElement("div", { className: 'theia-card no-content' }, core_1.nls.localize('theia/ai/history/view/noAgent', 'No agent available.'))));
|
|
82
82
|
}
|
|
83
83
|
return (React.createElement("div", { className: 'agent-history-widget' },
|
|
84
84
|
React.createElement(select_component_1.SelectComponent, { options: agents.map(agent => ({
|
|
@@ -90,14 +90,11 @@ let AIHistoryView = AIHistoryView_1 = class AIHistoryView extends browser_1.Reac
|
|
|
90
90
|
}
|
|
91
91
|
renderHistory() {
|
|
92
92
|
if (!this.selectedAgent) {
|
|
93
|
-
return React.createElement("div", { className: 'theia-card no-content' },
|
|
93
|
+
return React.createElement("div", { className: 'theia-card no-content' }, core_1.nls.localize('theia/ai/history/view/noAgentSelected', 'No agent selected.'));
|
|
94
94
|
}
|
|
95
95
|
const history = [...this.recordingService.getHistory(this.selectedAgent.id)];
|
|
96
96
|
if (history.length === 0) {
|
|
97
|
-
return React.createElement("div", { className: 'theia-card no-content' },
|
|
98
|
-
"No history available for the selected agent '",
|
|
99
|
-
this.selectedAgent.name,
|
|
100
|
-
"'.");
|
|
97
|
+
return React.createElement("div", { className: 'theia-card no-content' }, core_1.nls.localize('theia/ai/history/view/noHistoryForAgent', 'No history available for the selected agent \'{0}\'', this.selectedAgent.name));
|
|
101
98
|
}
|
|
102
99
|
if (!this.state.chronological) {
|
|
103
100
|
history.reverse();
|
|
@@ -117,7 +114,7 @@ let AIHistoryView = AIHistoryView_1 = class AIHistoryView extends browser_1.Reac
|
|
|
117
114
|
};
|
|
118
115
|
exports.AIHistoryView = AIHistoryView;
|
|
119
116
|
AIHistoryView.ID = 'ai-history-widget';
|
|
120
|
-
AIHistoryView.LABEL = '✨ AI Agent History [
|
|
117
|
+
AIHistoryView.LABEL = core_1.nls.localize('theia/ai/history/view/label', '✨ AI Agent History [Alpha]');
|
|
121
118
|
tslib_1.__decorate([
|
|
122
119
|
(0, inversify_1.inject)(ai_core_1.CommunicationRecordingService),
|
|
123
120
|
tslib_1.__metadata("design:type", Object)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-history-widget.js","sourceRoot":"","sources":["../../src/browser/ai-history-widget.tsx"],"names":[],"mappings":";;;;;AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAChF,4CAA2I;AAC3I,qDAA+E;AAC/E,4DAAiF;AACjF,kDAAkD;AAClD,mFAAoE;AACpE,uFAAiG;AACjG,
|
|
1
|
+
{"version":3,"file":"ai-history-widget.js","sourceRoot":"","sources":["../../src/browser/ai-history-widget.tsx"],"names":[],"mappings":";;;;;AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAChF,4CAA2I;AAC3I,qDAA+E;AAC/E,4DAAiF;AACjF,kDAAkD;AAClD,mFAAoE;AACpE,uFAAiG;AACjG,sCAA6C;AAStC,IAAM,aAAa,qBAAnB,MAAM,aAAc,SAAQ,qBAAW;IAa1C;QACI,KAAK,EAAE,CAAC;QAHF,WAAM,GAAwB,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC;QAI7D,IAAI,CAAC,EAAE,GAAG,eAAa,CAAC,EAAE,CAAC;QAC3B,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,eAAa,CAAC,KAAK,CAAC;QACvC,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,eAAa,CAAC,KAAK,CAAC;QACzC,I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,IAAI,eAAe;QACf,OAAO,IAAI,CAAC,KAAK,CAAC,aAAa,KAAK,IAAI,CAAC;IAC7C,CAAC;;AAvHQ,sCAAa;AAMR,gBAAE,GAAG,mBAAmB,AAAtB,CAAuB;AAChC,mBAAK,GAAG,UAAG,CAAC,QAAQ,CAAC,6BAA6B,EAAE,4BAA4B,CAAC,AAA5E,CAA6E;AAL/E;IADT,IAAA,kBAAM,EAAC,uCAA6B,CAAC;;uDACoB;AAEvC;IADlB,IAAA,kBAAM,EAAC,sBAAY,CAAC;;mDACyB;AAwCpC;IADT,IAAA,yBAAa,GAAE;;;;yCAOf;wBAlDQ,aAAa;IADzB,IAAA,sBAAU,GAAE;;GACA,aAAa,CAwHzB"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/ai-history",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.59.0-next.72+f41d8efcd",
|
|
4
4
|
"description": "Theia - AI communication history",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@theia/ai-core": "1.
|
|
7
|
-
"@theia/core": "1.
|
|
8
|
-
"@theia/filesystem": "1.
|
|
9
|
-
"@theia/output": "1.
|
|
10
|
-
"@theia/workspace": "1.
|
|
6
|
+
"@theia/ai-core": "1.59.0-next.72+f41d8efcd",
|
|
7
|
+
"@theia/core": "1.59.0-next.72+f41d8efcd",
|
|
8
|
+
"@theia/filesystem": "1.59.0-next.72+f41d8efcd",
|
|
9
|
+
"@theia/output": "1.59.0-next.72+f41d8efcd",
|
|
10
|
+
"@theia/workspace": "1.59.0-next.72+f41d8efcd",
|
|
11
11
|
"minimatch": "^5.1.0",
|
|
12
12
|
"tslib": "^2.6.2"
|
|
13
13
|
},
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"watch": "theiaext watch"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@theia/ext-scripts": "1.58.
|
|
48
|
+
"@theia/ext-scripts": "1.58.0"
|
|
49
49
|
},
|
|
50
50
|
"nyc": {
|
|
51
51
|
"extends": "../../configs/nyc.json"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "f41d8efcd4abb79167b74bf476eafc7857e97306"
|
|
54
54
|
}
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
import { CommunicationHistoryEntry } from '@theia/ai-core';
|
|
17
|
+
import { nls } from '@theia/core';
|
|
17
18
|
import * as React from '@theia/core/shared/react';
|
|
18
19
|
|
|
19
20
|
export interface CommunicationCardProps {
|
|
@@ -23,35 +24,35 @@ export interface CommunicationCardProps {
|
|
|
23
24
|
export const CommunicationCard: React.FC<CommunicationCardProps> = ({ entry }) => (
|
|
24
25
|
<div className='theia-card'>
|
|
25
26
|
<div className='theia-card-meta'>
|
|
26
|
-
<span className='theia-card-request-id'>Request ID: {entry.requestId}</span>
|
|
27
|
-
<span className='theia-card-session-id'>Session ID: {entry.sessionId}</span>
|
|
27
|
+
<span className='theia-card-request-id'>{nls.localize('theia/ai/history/communication-card/requestId', 'Request ID')}: {entry.requestId}</span>
|
|
28
|
+
<span className='theia-card-session-id'>{nls.localize('theia/ai/history/communication-card/sessionId', 'Session ID')}: {entry.sessionId}</span>
|
|
28
29
|
</div>
|
|
29
30
|
<div className='theia-card-content'>
|
|
30
31
|
{entry.request && (
|
|
31
32
|
<div className='theia-card-request'>
|
|
32
|
-
<h2>Request</h2>
|
|
33
|
+
<h2>{nls.localize('theia/ai/history/communication-card/request', 'Request')}</h2>
|
|
33
34
|
<pre>{entry.request}</pre>
|
|
34
35
|
</div>
|
|
35
36
|
)}
|
|
36
37
|
{entry.response && (
|
|
37
38
|
<div className='theia-card-response'>
|
|
38
|
-
<h2>Response</h2>
|
|
39
|
+
<h2>{nls.localize('theia/ai/history/communication-card/response', 'Response')}</h2>
|
|
39
40
|
<pre>{entry.response}</pre>
|
|
40
41
|
</div>
|
|
41
42
|
)}
|
|
42
43
|
{(entry.systemMessage || (entry.messages && entry.messages.length > 0)) && (
|
|
43
44
|
<div className='theia-card-context'>
|
|
44
45
|
<details>
|
|
45
|
-
<summary><h2>Context</h2></summary>
|
|
46
|
+
<summary><h2>{nls.localize('theia/ai/history/communication-card/context', 'Context')}</h2></summary>
|
|
46
47
|
{(entry.systemMessage && (
|
|
47
48
|
<div className='theia-context-system-message'>
|
|
48
|
-
<h3>System Message</h3>
|
|
49
|
+
<h3>{nls.localize('theia/ai/history/communication-card/systemMessage', 'System Message')}</h3>
|
|
49
50
|
<pre>{entry.systemMessage}</pre>
|
|
50
51
|
</div>
|
|
51
52
|
))}
|
|
52
53
|
{(entry.messages && entry.messages.length > 0) && (
|
|
53
54
|
<div className='theia-context-messages'>
|
|
54
|
-
<h3>Messages</h3>
|
|
55
|
+
<h3>{nls.localize('theia/ai/history/communication-card/messages', 'Messages')}</h3>
|
|
55
56
|
<ul>
|
|
56
57
|
{entry.messages.map((message, index) => (
|
|
57
58
|
<li key={index}><pre>{JSON.stringify(message, undefined, 2)}</pre></li>
|
|
@@ -64,8 +65,9 @@ export const CommunicationCard: React.FC<CommunicationCardProps> = ({ entry }) =
|
|
|
64
65
|
)}
|
|
65
66
|
</div>
|
|
66
67
|
<div className='theia-card-meta'>
|
|
67
|
-
<span className='theia-card-timestamp'>Timestamp: {new Date(entry.timestamp).toLocaleString()}</span>
|
|
68
|
-
{entry.responseTime &&
|
|
68
|
+
<span className='theia-card-timestamp'>{nls.localize('theia/ai/history/communication-card/timestamp', 'Timestamp')}: {new Date(entry.timestamp).toLocaleString()}</span>
|
|
69
|
+
{entry.responseTime &&
|
|
70
|
+
<span className='theia-card-response-time'>{nls.localize('theia/ai/history/communication-card/responseTime', 'Response Time')}: {entry.responseTime}ms</span>}
|
|
69
71
|
</div>
|
|
70
72
|
</div>
|
|
71
73
|
);
|
|
@@ -17,7 +17,7 @@ import { FrontendApplication, codicon } from '@theia/core/lib/browser';
|
|
|
17
17
|
import { AIViewContribution } from '@theia/ai-core/lib/browser';
|
|
18
18
|
import { inject, injectable } from '@theia/core/shared/inversify';
|
|
19
19
|
import { AIHistoryView } from './ai-history-widget';
|
|
20
|
-
import { Command, CommandRegistry, Emitter } from '@theia/core';
|
|
20
|
+
import { Command, CommandRegistry, Emitter, nls } from '@theia/core';
|
|
21
21
|
import { TabBarToolbarContribution, TabBarToolbarRegistry } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
|
|
22
22
|
import { CommunicationRecordingService } from '@theia/ai-core';
|
|
23
23
|
|
|
@@ -115,21 +115,21 @@ export class AIHistoryViewContribution extends AIViewContribution<AIHistoryView>
|
|
|
115
115
|
registry.registerItem({
|
|
116
116
|
id: AI_HISTORY_VIEW_SORT_CHRONOLOGICALLY.id,
|
|
117
117
|
command: AI_HISTORY_VIEW_SORT_CHRONOLOGICALLY.id,
|
|
118
|
-
tooltip: 'Sort chronologically',
|
|
118
|
+
tooltip: nls.localize('theia/ai/history/sortChronologically/tooltip', 'Sort chronologically'),
|
|
119
119
|
isVisible: widget => this.withHistoryWidget(widget),
|
|
120
120
|
onDidChange: this.chronologicalStateChanged
|
|
121
121
|
});
|
|
122
122
|
registry.registerItem({
|
|
123
123
|
id: AI_HISTORY_VIEW_SORT_REVERSE_CHRONOLOGICALLY.id,
|
|
124
124
|
command: AI_HISTORY_VIEW_SORT_REVERSE_CHRONOLOGICALLY.id,
|
|
125
|
-
tooltip: 'Sort reverse chronologically',
|
|
125
|
+
tooltip: nls.localize('theia/ai/history/sortReverseChronologically/tooltip', 'Sort reverse chronologically'),
|
|
126
126
|
isVisible: widget => this.withHistoryWidget(widget),
|
|
127
127
|
onDidChange: this.chronologicalStateChanged
|
|
128
128
|
});
|
|
129
129
|
registry.registerItem({
|
|
130
130
|
id: AI_HISTORY_VIEW_CLEAR.id,
|
|
131
131
|
command: AI_HISTORY_VIEW_CLEAR.id,
|
|
132
|
-
tooltip: 'Clear History of all agents',
|
|
132
|
+
tooltip: nls.localize('theia/ai/history/clear/tooltip', 'Clear History of all agents'),
|
|
133
133
|
isVisible: widget => this.withHistoryWidget(widget)
|
|
134
134
|
});
|
|
135
135
|
}
|
|
@@ -17,7 +17,6 @@ import { CommunicationRecordingService } from '@theia/ai-core';
|
|
|
17
17
|
import { ContainerModule } from '@theia/core/shared/inversify';
|
|
18
18
|
import { DefaultCommunicationRecordingService } from '../common/communication-recording-service';
|
|
19
19
|
import { bindViewContribution, WidgetFactory } from '@theia/core/lib/browser';
|
|
20
|
-
import { ILogger } from '@theia/core';
|
|
21
20
|
import { AIHistoryViewContribution } from './ai-history-contribution';
|
|
22
21
|
import { AIHistoryView } from './ai-history-widget';
|
|
23
22
|
import '../../src/browser/style/ai-history.css';
|
|
@@ -27,11 +26,6 @@ export default new ContainerModule(bind => {
|
|
|
27
26
|
bind(DefaultCommunicationRecordingService).toSelf().inSingletonScope();
|
|
28
27
|
bind(CommunicationRecordingService).toService(DefaultCommunicationRecordingService);
|
|
29
28
|
|
|
30
|
-
bind(ILogger).toDynamicValue(ctx => {
|
|
31
|
-
const parentLogger = ctx.container.get<ILogger>(ILogger);
|
|
32
|
-
return parentLogger.child('llm-communication-recorder');
|
|
33
|
-
}).inSingletonScope().whenTargetNamed('llm-communication-recorder');
|
|
34
|
-
|
|
35
29
|
bindViewContribution(bind, AIHistoryViewContribution);
|
|
36
30
|
|
|
37
31
|
bind(AIHistoryView).toSelf();
|
|
@@ -19,7 +19,7 @@ import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'
|
|
|
19
19
|
import * as React from '@theia/core/shared/react';
|
|
20
20
|
import { CommunicationCard } from './ai-history-communication-card';
|
|
21
21
|
import { SelectComponent, SelectOption } from '@theia/core/lib/browser/widgets/select-component';
|
|
22
|
-
import { deepClone } from '@theia/core';
|
|
22
|
+
import { deepClone, nls } from '@theia/core';
|
|
23
23
|
|
|
24
24
|
namespace AIHistoryView {
|
|
25
25
|
export interface State {
|
|
@@ -35,7 +35,7 @@ export class AIHistoryView extends ReactWidget implements StatefulWidget {
|
|
|
35
35
|
protected readonly agentService: AgentService;
|
|
36
36
|
|
|
37
37
|
public static ID = 'ai-history-widget';
|
|
38
|
-
static LABEL = '✨ AI Agent History [
|
|
38
|
+
static LABEL = nls.localize('theia/ai/history/view/label', '✨ AI Agent History [Alpha]');
|
|
39
39
|
|
|
40
40
|
protected selectedAgent?: Agent;
|
|
41
41
|
|
|
@@ -100,7 +100,7 @@ export class AIHistoryView extends ReactWidget implements StatefulWidget {
|
|
|
100
100
|
if (agents.length === 0) {
|
|
101
101
|
return (
|
|
102
102
|
<div className='agent-history-widget'>
|
|
103
|
-
<div className='theia-card no-content'>No agent available
|
|
103
|
+
<div className='theia-card no-content'>{nls.localize('theia/ai/history/view/noAgent', 'No agent available.')}</div>
|
|
104
104
|
</div >);
|
|
105
105
|
}
|
|
106
106
|
return (
|
|
@@ -122,11 +122,13 @@ export class AIHistoryView extends ReactWidget implements StatefulWidget {
|
|
|
122
122
|
|
|
123
123
|
protected renderHistory(): React.ReactNode {
|
|
124
124
|
if (!this.selectedAgent) {
|
|
125
|
-
return <div className='theia-card no-content'>No agent selected
|
|
125
|
+
return <div className='theia-card no-content'>{nls.localize('theia/ai/history/view/noAgentSelected', 'No agent selected.')}</div>;
|
|
126
126
|
}
|
|
127
127
|
const history = [...this.recordingService.getHistory(this.selectedAgent.id)];
|
|
128
128
|
if (history.length === 0) {
|
|
129
|
-
return <div className='theia-card no-content'>
|
|
129
|
+
return <div className='theia-card no-content'>
|
|
130
|
+
{nls.localize('theia/ai/history/view/noHistoryForAgent', 'No history available for the selected agent \'{0}\'', this.selectedAgent.name)}
|
|
131
|
+
</div>;
|
|
130
132
|
}
|
|
131
133
|
if (!this.state.chronological) {
|
|
132
134
|
history.reverse();
|