@involvex/super-agent-cli 0.0.87 → 0.0.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +122 -13
- package/dist/super-agent-cli.exe +0 -0
- package/dist/super-agent.js +5 -1
- package/eslint.config.mjs +1 -1
- package/package.json +3 -4
- package/super-agent.js +5 -1
- package/vscode-extension/.vscodeignore +1 -1
- package/vscode-extension/build.js +4 -4
- package/vscode-extension/dist/chat-provider.js +262 -0
- package/vscode-extension/dist/chat-provider.js.map +1 -0
- package/vscode-extension/dist/chat.css +268 -0
- package/vscode-extension/dist/chat.js +234 -0
- package/vscode-extension/dist/cli-connector.js +296 -0
- package/vscode-extension/dist/cli-connector.js.map +1 -0
- package/vscode-extension/dist/extension.js +156 -0
- package/vscode-extension/dist/extension.js.map +1 -0
- package/vscode-extension/dist/file-context.js +230 -0
- package/vscode-extension/dist/file-context.js.map +1 -0
- package/vscode-extension/dist/node_modules/ws/LICENSE +20 -0
- package/vscode-extension/dist/node_modules/ws/README.md +548 -0
- package/vscode-extension/dist/node_modules/ws/browser.js +8 -0
- package/vscode-extension/dist/node_modules/ws/index.js +13 -0
- package/vscode-extension/dist/node_modules/ws/lib/buffer-util.js +131 -0
- package/vscode-extension/dist/node_modules/ws/lib/constants.js +19 -0
- package/vscode-extension/dist/node_modules/ws/lib/event-target.js +292 -0
- package/vscode-extension/dist/node_modules/ws/lib/extension.js +203 -0
- package/vscode-extension/dist/node_modules/ws/lib/limiter.js +55 -0
- package/vscode-extension/dist/node_modules/ws/lib/permessage-deflate.js +528 -0
- package/vscode-extension/dist/node_modules/ws/lib/receiver.js +706 -0
- package/vscode-extension/dist/node_modules/ws/lib/sender.js +602 -0
- package/vscode-extension/dist/node_modules/ws/lib/stream.js +161 -0
- package/vscode-extension/dist/node_modules/ws/lib/subprotocol.js +62 -0
- package/vscode-extension/dist/node_modules/ws/lib/validation.js +152 -0
- package/vscode-extension/dist/node_modules/ws/lib/websocket-server.js +554 -0
- package/vscode-extension/dist/node_modules/ws/lib/websocket.js +1393 -0
- package/vscode-extension/dist/node_modules/ws/package.json +69 -0
- package/vscode-extension/dist/node_modules/ws/wrapper.mjs +8 -0
- package/vscode-extension/dist/super-agent-vscode-0.0.2.vsix +0 -0
- package/vscode-extension/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1731,7 +1731,7 @@ var init_indexer = __esm(() => {
|
|
|
1731
1731
|
var require_package = __commonJS((exports, module) => {
|
|
1732
1732
|
module.exports = {
|
|
1733
1733
|
name: "@involvex/super-agent-cli",
|
|
1734
|
-
version: "0.0.
|
|
1734
|
+
version: "0.0.89",
|
|
1735
1735
|
description: "An open-source AI agent that brings the power of Super Agent directly into your terminal.",
|
|
1736
1736
|
keywords: [
|
|
1737
1737
|
"cli",
|
|
@@ -1759,7 +1759,7 @@ var require_package = __commonJS((exports, module) => {
|
|
|
1759
1759
|
},
|
|
1760
1760
|
main: "dist/index.js",
|
|
1761
1761
|
bin: {
|
|
1762
|
-
"super-agent": "super-agent.js"
|
|
1762
|
+
"super-agent": "dist/super-agent.js"
|
|
1763
1763
|
},
|
|
1764
1764
|
workspaces: [
|
|
1765
1765
|
"@plugins/templates/*",
|
|
@@ -1768,7 +1768,7 @@ var require_package = __commonJS((exports, module) => {
|
|
|
1768
1768
|
],
|
|
1769
1769
|
scripts: {
|
|
1770
1770
|
prebuild: "bun run format && bun run lint:fix && bun run typecheck",
|
|
1771
|
-
build: "bun build src/index.ts --outdir ./dist --target node --packages external --format esm && bun run copy-bin && bun run build:web",
|
|
1771
|
+
build: "bun build src/index.ts --outdir ./dist --target node --packages external --format esm && bun run copy-bin && bun run build:web && bun run build:plugins && bun run build:vscode && bun run package:vscode",
|
|
1772
1772
|
"build:bun": "bun build src/index.ts --outdir ./dist --target node --packages external --format esm",
|
|
1773
1773
|
"build:plugins": "bun run -F @involvex/super-agent\\* build",
|
|
1774
1774
|
"build:vscode": "bun run -F super-agent-vscode build",
|
|
@@ -1805,7 +1805,6 @@ var require_package = __commonJS((exports, module) => {
|
|
|
1805
1805
|
commander: "^14.0.3",
|
|
1806
1806
|
"conventional-changelog-cli": "^5.0.0",
|
|
1807
1807
|
dotenv: "^17.2.3",
|
|
1808
|
-
enquirer: "^2.4.1",
|
|
1809
1808
|
firebase: "^12.8.0",
|
|
1810
1809
|
"fs-extra": "^11.3.3",
|
|
1811
1810
|
ignore: "^7.0.5",
|
|
@@ -2345,6 +2344,9 @@ function useEnhancedInput({
|
|
|
2345
2344
|
return;
|
|
2346
2345
|
}
|
|
2347
2346
|
if (key.ctrl && (inputChar === "c" || inputChar === "C") || inputChar === "\x03") {
|
|
2347
|
+
if (input.length === 0) {
|
|
2348
|
+
process.exit(0);
|
|
2349
|
+
}
|
|
2348
2350
|
setInputState("");
|
|
2349
2351
|
setCursorPositionState(0);
|
|
2350
2352
|
setOriginalInput("");
|
|
@@ -7413,7 +7415,11 @@ function getLogger() {
|
|
|
7413
7415
|
// src/ui/components/config-viewer.tsx
|
|
7414
7416
|
import { Box as Box10, Text as Text9 } from "ink";
|
|
7415
7417
|
import { jsxDEV as jsxDEV10 } from "react/jsx-dev-runtime";
|
|
7416
|
-
function ConfigViewer({
|
|
7418
|
+
function ConfigViewer({
|
|
7419
|
+
config,
|
|
7420
|
+
isVisible = true,
|
|
7421
|
+
onClose
|
|
7422
|
+
}) {
|
|
7417
7423
|
if (!isVisible) {
|
|
7418
7424
|
return null;
|
|
7419
7425
|
}
|
|
@@ -7572,7 +7578,7 @@ function MarkdownRenderer({ content }) {
|
|
|
7572
7578
|
}
|
|
7573
7579
|
|
|
7574
7580
|
// src/ui/components/chat-history.tsx
|
|
7575
|
-
import { Box as Box11, Text as Text11 } from "ink";
|
|
7581
|
+
import { Box as Box11, Static, Text as Text11 } from "ink";
|
|
7576
7582
|
import React3 from "react";
|
|
7577
7583
|
import { jsxDEV as jsxDEV12 } from "react/jsx-dev-runtime";
|
|
7578
7584
|
var MemoizedChatEntry = React3.memo(({ entry, index }) => {
|
|
@@ -7790,10 +7796,13 @@ function ChatHistory({
|
|
|
7790
7796
|
const filteredEntries = isConfirmationActive ? entries.filter((entry) => !(entry.type === "tool_call" && entry.content === "Executing...")) : entries;
|
|
7791
7797
|
return /* @__PURE__ */ jsxDEV12(Box11, {
|
|
7792
7798
|
flexDirection: "column",
|
|
7793
|
-
children:
|
|
7794
|
-
|
|
7795
|
-
index
|
|
7796
|
-
|
|
7799
|
+
children: /* @__PURE__ */ jsxDEV12(Static, {
|
|
7800
|
+
items: filteredEntries,
|
|
7801
|
+
children: (entry, index) => /* @__PURE__ */ jsxDEV12(MemoizedChatEntry, {
|
|
7802
|
+
entry,
|
|
7803
|
+
index
|
|
7804
|
+
}, `${entry.timestamp.getTime()}-${index}`, false, undefined, this)
|
|
7805
|
+
}, undefined, false, undefined, this)
|
|
7797
7806
|
}, undefined, false, undefined, this);
|
|
7798
7807
|
}
|
|
7799
7808
|
|
|
@@ -10246,6 +10255,9 @@ IMPORTANT RESPONSE GUIDELINES:
|
|
|
10246
10255
|
Current working directory: ${process.cwd()}`
|
|
10247
10256
|
});
|
|
10248
10257
|
}
|
|
10258
|
+
getChatHistory() {
|
|
10259
|
+
return this.chatHistory;
|
|
10260
|
+
}
|
|
10249
10261
|
async setProvider(providerId) {
|
|
10250
10262
|
const manager = getSettingsManager();
|
|
10251
10263
|
const activeProviderId = (providerId || "grok").toLowerCase();
|
|
@@ -11929,16 +11941,23 @@ class WebServer {
|
|
|
11929
11941
|
ws.on("message", async (data) => {
|
|
11930
11942
|
try {
|
|
11931
11943
|
const message = JSON.parse(data.toString());
|
|
11932
|
-
if (message.type === "prompt") {
|
|
11933
|
-
|
|
11944
|
+
if (message.type === "prompt" || message.type === "chat_message") {
|
|
11945
|
+
const content = message.content?.message || message.content || "";
|
|
11946
|
+
await this.handlePrompt(content, ws);
|
|
11934
11947
|
} else if (message.type === "get_file_tree") {
|
|
11935
11948
|
await this.handleGetFileTree(ws);
|
|
11936
11949
|
} else if (message.type === "get_file_content") {
|
|
11937
|
-
|
|
11950
|
+
const filePath = message.path || message.filePath;
|
|
11951
|
+
await this.handleGetFileContent(filePath, ws);
|
|
11938
11952
|
} else if (message.type === "list_sessions") {
|
|
11939
11953
|
await this.handleListSessions(ws);
|
|
11940
11954
|
} else if (message.type === "switch_session") {
|
|
11941
11955
|
await this.handleSwitchSession(message.sessionId, ws);
|
|
11956
|
+
} else if (message.type === "get_chat_history") {
|
|
11957
|
+
await this.handleGetChatHistory(ws);
|
|
11958
|
+
} else if (message.type === "abort") {
|
|
11959
|
+
this.agent.abortCurrentOperation();
|
|
11960
|
+
ws.send(JSON.stringify({ type: "done", content: "Operation aborted" }));
|
|
11942
11961
|
}
|
|
11943
11962
|
} catch (error) {
|
|
11944
11963
|
console.error("WebSocket message error:", error);
|
|
@@ -12062,6 +12081,23 @@ class WebServer {
|
|
|
12062
12081
|
ws.send(JSON.stringify({ type: "error", content: error.message }));
|
|
12063
12082
|
}
|
|
12064
12083
|
}
|
|
12084
|
+
async handleGetChatHistory(ws) {
|
|
12085
|
+
try {
|
|
12086
|
+
const history = this.agent.getChatHistory();
|
|
12087
|
+
ws.send(JSON.stringify({
|
|
12088
|
+
type: "chat_history",
|
|
12089
|
+
messages: history.map((entry) => ({
|
|
12090
|
+
role: entry.type === "user" ? "user" : "assistant",
|
|
12091
|
+
content: entry.content,
|
|
12092
|
+
timestamp: entry.timestamp,
|
|
12093
|
+
toolCall: entry.toolCall,
|
|
12094
|
+
toolResult: entry.toolResult
|
|
12095
|
+
}))
|
|
12096
|
+
}));
|
|
12097
|
+
} catch (error) {
|
|
12098
|
+
ws.send(JSON.stringify({ type: "error", content: error.message }));
|
|
12099
|
+
}
|
|
12100
|
+
}
|
|
12065
12101
|
async checkAndSendUpdateNotification(ws) {
|
|
12066
12102
|
try {
|
|
12067
12103
|
const pkg = await Promise.resolve().then(() => __toESM(require_package(), 1));
|
|
@@ -13003,6 +13039,78 @@ function createGitCommand() {
|
|
|
13003
13039
|
return gitCommand;
|
|
13004
13040
|
}
|
|
13005
13041
|
|
|
13042
|
+
// src/commands/statusbar.ts
|
|
13043
|
+
init_settings_manager();
|
|
13044
|
+
import { Command as Command11 } from "commander";
|
|
13045
|
+
import inquirer4 from "inquirer";
|
|
13046
|
+
function createStatusBarCommand() {
|
|
13047
|
+
const command = new Command11("statusbar");
|
|
13048
|
+
command.description("Configure status bar settings").action(async () => {
|
|
13049
|
+
const manager = getSettingsManager();
|
|
13050
|
+
const settings = manager.loadUserSettings();
|
|
13051
|
+
const currentConfig = settings.ui.statusbar_config || {
|
|
13052
|
+
show_model: true,
|
|
13053
|
+
show_tokens: true,
|
|
13054
|
+
show_git_status: true,
|
|
13055
|
+
show_memory: false,
|
|
13056
|
+
show_context: false
|
|
13057
|
+
};
|
|
13058
|
+
try {
|
|
13059
|
+
const response = await inquirer4.prompt([
|
|
13060
|
+
{
|
|
13061
|
+
type: "checkbox",
|
|
13062
|
+
name: "features",
|
|
13063
|
+
message: "Select status bar features to display:",
|
|
13064
|
+
choices: [
|
|
13065
|
+
{
|
|
13066
|
+
name: "Model Name",
|
|
13067
|
+
value: "show_model",
|
|
13068
|
+
checked: currentConfig.show_model
|
|
13069
|
+
},
|
|
13070
|
+
{
|
|
13071
|
+
name: "Token Count",
|
|
13072
|
+
value: "show_tokens",
|
|
13073
|
+
checked: currentConfig.show_tokens
|
|
13074
|
+
},
|
|
13075
|
+
{
|
|
13076
|
+
name: "Git Status",
|
|
13077
|
+
value: "show_git_status",
|
|
13078
|
+
checked: currentConfig.show_git_status
|
|
13079
|
+
},
|
|
13080
|
+
{
|
|
13081
|
+
name: "Memory Usage",
|
|
13082
|
+
value: "show_memory",
|
|
13083
|
+
checked: currentConfig.show_memory
|
|
13084
|
+
},
|
|
13085
|
+
{
|
|
13086
|
+
name: "Context Size",
|
|
13087
|
+
value: "show_context",
|
|
13088
|
+
checked: currentConfig.show_context
|
|
13089
|
+
}
|
|
13090
|
+
]
|
|
13091
|
+
}
|
|
13092
|
+
]);
|
|
13093
|
+
const newConfig = {
|
|
13094
|
+
show_model: response.features.includes("show_model"),
|
|
13095
|
+
show_tokens: response.features.includes("show_tokens"),
|
|
13096
|
+
show_git_status: response.features.includes("show_git_status"),
|
|
13097
|
+
show_memory: response.features.includes("show_memory"),
|
|
13098
|
+
show_context: response.features.includes("show_context")
|
|
13099
|
+
};
|
|
13100
|
+
manager.saveUserSettings({
|
|
13101
|
+
ui: {
|
|
13102
|
+
...settings.ui,
|
|
13103
|
+
statusbar_config: newConfig
|
|
13104
|
+
}
|
|
13105
|
+
});
|
|
13106
|
+
console.log("✓ Status bar configuration updated");
|
|
13107
|
+
} catch (error) {
|
|
13108
|
+
console.error("Failed to update status bar configuration:", error);
|
|
13109
|
+
}
|
|
13110
|
+
});
|
|
13111
|
+
return command;
|
|
13112
|
+
}
|
|
13113
|
+
|
|
13006
13114
|
// src/commands/index.ts
|
|
13007
13115
|
function registerCommands(program) {
|
|
13008
13116
|
program.addCommand(createMCPCommand());
|
|
@@ -13016,6 +13124,7 @@ function registerCommands(program) {
|
|
|
13016
13124
|
program.addCommand(createProviderCommand());
|
|
13017
13125
|
program.addCommand(createIndexCommand());
|
|
13018
13126
|
program.addCommand(createRepositoryCommand());
|
|
13127
|
+
program.addCommand(createStatusBarCommand());
|
|
13019
13128
|
}
|
|
13020
13129
|
|
|
13021
13130
|
// src/index.ts
|
package/dist/super-agent-cli.exe
CHANGED
|
Binary file
|
package/dist/super-agent.js
CHANGED
|
@@ -9,4 +9,8 @@ const __filename = fileURLToPath(import.meta.url);
|
|
|
9
9
|
const __dirname = dirname(__filename);
|
|
10
10
|
|
|
11
11
|
// Import and run the bundled CLI
|
|
12
|
-
|
|
12
|
+
const indexPath = __dirname.endsWith("dist")
|
|
13
|
+
? join(__dirname, "index.js")
|
|
14
|
+
: join(__dirname, "dist", "index.js");
|
|
15
|
+
|
|
16
|
+
import(indexPath);
|
package/eslint.config.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@involvex/super-agent-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.89",
|
|
4
4
|
"description": "An open-source AI agent that brings the power of Super Agent directly into your terminal.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"main": "dist/index.js",
|
|
30
30
|
"bin": {
|
|
31
|
-
"super-agent": "super-agent.js"
|
|
31
|
+
"super-agent": "dist/super-agent.js"
|
|
32
32
|
},
|
|
33
33
|
"workspaces": [
|
|
34
34
|
"@plugins/templates/*",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
],
|
|
38
38
|
"scripts": {
|
|
39
39
|
"prebuild": "bun run format && bun run lint:fix && bun run typecheck",
|
|
40
|
-
"build": "bun build src/index.ts --outdir ./dist --target node --packages external --format esm && bun run copy-bin && bun run build:web",
|
|
40
|
+
"build": "bun build src/index.ts --outdir ./dist --target node --packages external --format esm && bun run copy-bin && bun run build:web && bun run build:plugins && bun run build:vscode && bun run package:vscode",
|
|
41
41
|
"build:bun": "bun build src/index.ts --outdir ./dist --target node --packages external --format esm",
|
|
42
42
|
"build:plugins": "bun run -F @involvex/super-agent\\* build",
|
|
43
43
|
"build:vscode": "bun run -F super-agent-vscode build",
|
|
@@ -74,7 +74,6 @@
|
|
|
74
74
|
"commander": "^14.0.3",
|
|
75
75
|
"conventional-changelog-cli": "^5.0.0",
|
|
76
76
|
"dotenv": "^17.2.3",
|
|
77
|
-
"enquirer": "^2.4.1",
|
|
78
77
|
"firebase": "^12.8.0",
|
|
79
78
|
"fs-extra": "^11.3.3",
|
|
80
79
|
"ignore": "^7.0.5",
|
package/super-agent.js
CHANGED
|
@@ -9,4 +9,8 @@ const __filename = fileURLToPath(import.meta.url);
|
|
|
9
9
|
const __dirname = dirname(__filename);
|
|
10
10
|
|
|
11
11
|
// Import and run the bundled CLI
|
|
12
|
-
|
|
12
|
+
const indexPath = __dirname.endsWith("dist")
|
|
13
|
+
? join(__dirname, "index.js")
|
|
14
|
+
: join(__dirname, "dist", "index.js");
|
|
15
|
+
|
|
16
|
+
import(indexPath);
|
|
@@ -2,7 +2,7 @@ const path = require("path");
|
|
|
2
2
|
const fs = require("fs");
|
|
3
3
|
|
|
4
4
|
const srcDir = path.join(__dirname, "src");
|
|
5
|
-
const outDir = path.join(__dirname, "
|
|
5
|
+
const outDir = path.join(__dirname, "dist");
|
|
6
6
|
|
|
7
7
|
// Ensure out directory exists
|
|
8
8
|
if (!fs.existsSync(outDir)) {
|
|
@@ -18,20 +18,20 @@ for (const file of assetsToCopy) {
|
|
|
18
18
|
|
|
19
19
|
if (fs.existsSync(srcPath)) {
|
|
20
20
|
fs.copyFileSync(srcPath, outPath);
|
|
21
|
-
console.log(`Copied ${file} to
|
|
21
|
+
console.log(`Copied ${file} to dist/`);
|
|
22
22
|
} else {
|
|
23
23
|
console.warn(`Source file not found: ${srcPath}`);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
// Copy ws dependency to
|
|
27
|
+
// Copy ws dependency to dist/node_modules for packaging
|
|
28
28
|
const wsSrc = path.join(__dirname, "node_modules", "ws");
|
|
29
29
|
const wsDest = path.join(outDir, "node_modules", "ws");
|
|
30
30
|
|
|
31
31
|
if (fs.existsSync(wsSrc)) {
|
|
32
32
|
// Copy recursively
|
|
33
33
|
copyDirectory(wsSrc, wsDest);
|
|
34
|
-
console.log("Copied ws to
|
|
34
|
+
console.log("Copied ws to dist/node_modules/");
|
|
35
35
|
} else {
|
|
36
36
|
console.warn("ws not found in node_modules");
|
|
37
37
|
}
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.ChatProvider = void 0;
|
|
37
|
+
const vscode = __importStar(require("vscode"));
|
|
38
|
+
class ChatProvider {
|
|
39
|
+
context;
|
|
40
|
+
extensionUri;
|
|
41
|
+
cliConnector;
|
|
42
|
+
fileContextProvider;
|
|
43
|
+
messages = [];
|
|
44
|
+
webviewView;
|
|
45
|
+
disposables = [];
|
|
46
|
+
constructor(context, extensionUri, cliConnector, fileContextProvider) {
|
|
47
|
+
this.context = context;
|
|
48
|
+
this.extensionUri = extensionUri;
|
|
49
|
+
this.cliConnector = cliConnector;
|
|
50
|
+
this.fileContextProvider = fileContextProvider;
|
|
51
|
+
this.setupCLIMessageHandlers();
|
|
52
|
+
// Listen for status changes from the connector
|
|
53
|
+
this.disposables.push(new vscode.Disposable(this.cliConnector.onStatusChange(connected => {
|
|
54
|
+
this.updateConnectionStatus(connected);
|
|
55
|
+
})));
|
|
56
|
+
}
|
|
57
|
+
setupCLIMessageHandlers() {
|
|
58
|
+
// Handle incoming messages from CLI
|
|
59
|
+
// CLI sends 'assistant_message', 'user_message', 'tool_call', 'tool_result', 'done', 'error'
|
|
60
|
+
this.cliConnector.onMessage("assistant_message", (response) => {
|
|
61
|
+
this.addAssistantMessage(response.content || "");
|
|
62
|
+
this.updateWebview();
|
|
63
|
+
});
|
|
64
|
+
this.cliConnector.onMessage("user_message", (response) => {
|
|
65
|
+
// Optional: handle if we want to sync user messages from other clients
|
|
66
|
+
});
|
|
67
|
+
this.cliConnector.onMessage("tool_call", (response) => {
|
|
68
|
+
this.addSystemMessage(`Tool: ${response.content || "Executing..."}`);
|
|
69
|
+
this.updateWebview();
|
|
70
|
+
});
|
|
71
|
+
this.cliConnector.onMessage("error", (response) => {
|
|
72
|
+
this.addSystemMessage(`Error: ${response.error || response.content}`);
|
|
73
|
+
this.updateWebview();
|
|
74
|
+
});
|
|
75
|
+
this.cliConnector.onMessage("done", () => {
|
|
76
|
+
// Handle completion if needed
|
|
77
|
+
});
|
|
78
|
+
this.cliConnector.onMessage("file_tree", (response) => {
|
|
79
|
+
// Handle file tree if needed
|
|
80
|
+
});
|
|
81
|
+
this.cliConnector.onMessage("file_content", (response) => {
|
|
82
|
+
// Handle file content if needed
|
|
83
|
+
});
|
|
84
|
+
this.cliConnector.onMessage("chat_history", (response) => {
|
|
85
|
+
if (response.messages) {
|
|
86
|
+
this.messages = response.messages.map((msg) => ({
|
|
87
|
+
id: this.generateId(),
|
|
88
|
+
role: msg.role,
|
|
89
|
+
content: msg.content,
|
|
90
|
+
timestamp: new Date(msg.timestamp),
|
|
91
|
+
}));
|
|
92
|
+
this.updateWebview();
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
resolveWebviewView(webviewView) {
|
|
97
|
+
this.webviewView = webviewView;
|
|
98
|
+
webviewView.webview.options = {
|
|
99
|
+
enableScripts: true,
|
|
100
|
+
localResourceRoots: [this.extensionUri],
|
|
101
|
+
};
|
|
102
|
+
webviewView.webview.html = this.getHtmlContent(webviewView.webview);
|
|
103
|
+
// Handle messages from webview
|
|
104
|
+
webviewView.webview.onDidReceiveMessage(async (message) => {
|
|
105
|
+
await this.handleWebviewMessage(message);
|
|
106
|
+
}, null, this.disposables);
|
|
107
|
+
// Update with current connection status
|
|
108
|
+
this.updateConnectionStatus(this.cliConnector.getConnectionStatus());
|
|
109
|
+
}
|
|
110
|
+
async handleWebviewMessage(message) {
|
|
111
|
+
switch (message.type) {
|
|
112
|
+
case "ready":
|
|
113
|
+
this.updateConnectionStatus(this.cliConnector.getConnectionStatus());
|
|
114
|
+
this.cliConnector.requestChatHistory();
|
|
115
|
+
break;
|
|
116
|
+
case "sendMessage":
|
|
117
|
+
await this.handleSendMessage(message.content);
|
|
118
|
+
break;
|
|
119
|
+
case "getFileContext":
|
|
120
|
+
await this.handleGetFileContext();
|
|
121
|
+
break;
|
|
122
|
+
case "openFile":
|
|
123
|
+
await this.handleOpenFile(message.filePath);
|
|
124
|
+
break;
|
|
125
|
+
case "requestHistory":
|
|
126
|
+
this.cliConnector.requestChatHistory();
|
|
127
|
+
break;
|
|
128
|
+
case "clearHistory":
|
|
129
|
+
this.messages = [];
|
|
130
|
+
this.updateWebview();
|
|
131
|
+
break;
|
|
132
|
+
case "abort":
|
|
133
|
+
this.cliConnector.abortOperation();
|
|
134
|
+
break;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
async handleSendMessage(content) {
|
|
138
|
+
// Expand file mentions if any
|
|
139
|
+
const expandedContent = await this.fileContextProvider.expandFileMentions(content);
|
|
140
|
+
// Parse file mentions for display
|
|
141
|
+
const mentions = this.fileContextProvider.parseFileMentions(content);
|
|
142
|
+
const fileContexts = [];
|
|
143
|
+
for (const mention of mentions) {
|
|
144
|
+
const filePath = mention.startsWith("/") ? mention : mention; // Handle both absolute and relative paths
|
|
145
|
+
if (vscode.workspace.workspaceFolders) {
|
|
146
|
+
const workspaceRoot = vscode.workspace.workspaceFolders[0].uri.fsPath;
|
|
147
|
+
const absolutePath = require("path").join(workspaceRoot, filePath);
|
|
148
|
+
const fileMention = await this.fileContextProvider.getFileMention(absolutePath);
|
|
149
|
+
if (fileMention) {
|
|
150
|
+
fileContexts.push(fileMention);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
// Add user message
|
|
155
|
+
this.addUserMessage(content, fileContexts);
|
|
156
|
+
this.updateWebview();
|
|
157
|
+
// Send to CLI
|
|
158
|
+
this.cliConnector.sendChatMessage(expandedContent, mentions);
|
|
159
|
+
}
|
|
160
|
+
async handleGetFileContext() {
|
|
161
|
+
const currentFile = await this.fileContextProvider.getCurrentFileMention();
|
|
162
|
+
const openFiles = await this.fileContextProvider.getOpenFileMentions();
|
|
163
|
+
this.postMessageToWebview({
|
|
164
|
+
type: "fileContext",
|
|
165
|
+
currentFile,
|
|
166
|
+
openFiles,
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
async handleOpenFile(filePath) {
|
|
170
|
+
try {
|
|
171
|
+
const document = await vscode.workspace.openTextDocument(vscode.Uri.file(filePath));
|
|
172
|
+
await vscode.window.showTextDocument(document);
|
|
173
|
+
}
|
|
174
|
+
catch (error) {
|
|
175
|
+
vscode.window.showErrorMessage(`Failed to open file: ${filePath}`);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
addUserMessage(content, fileContexts) {
|
|
179
|
+
this.messages.push({
|
|
180
|
+
id: this.generateId(),
|
|
181
|
+
role: "user",
|
|
182
|
+
content,
|
|
183
|
+
timestamp: new Date(),
|
|
184
|
+
fileContexts,
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
addAssistantMessage(content) {
|
|
188
|
+
this.messages.push({
|
|
189
|
+
id: this.generateId(),
|
|
190
|
+
role: "assistant",
|
|
191
|
+
content,
|
|
192
|
+
timestamp: new Date(),
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
addSystemMessage(content) {
|
|
196
|
+
this.messages.push({
|
|
197
|
+
id: this.generateId(),
|
|
198
|
+
role: "system",
|
|
199
|
+
content,
|
|
200
|
+
timestamp: new Date(),
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
updateWebview() {
|
|
204
|
+
this.postMessageToWebview({
|
|
205
|
+
type: "messages",
|
|
206
|
+
messages: this.messages,
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
updateConnectionStatus(connected) {
|
|
210
|
+
this.postMessageToWebview({
|
|
211
|
+
type: "connectionStatus",
|
|
212
|
+
connected,
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
postMessageToWebview(message) {
|
|
216
|
+
if (this.webviewView) {
|
|
217
|
+
this.webviewView.webview.postMessage(message);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
getHtmlContent(webview) {
|
|
221
|
+
const scriptUri = webview.asWebviewUri(vscode.Uri.file(this.extensionUri.path + "/dist/chat.js"));
|
|
222
|
+
const styleUri = webview.asWebviewUri(vscode.Uri.file(this.extensionUri.path + "/dist/chat.css"));
|
|
223
|
+
return `<!DOCTYPE html>
|
|
224
|
+
<html>
|
|
225
|
+
<head>
|
|
226
|
+
<meta charset="UTF-8">
|
|
227
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
228
|
+
<title>Super Agent Chat</title>
|
|
229
|
+
<link rel="stylesheet" href="${styleUri}">
|
|
230
|
+
</head>
|
|
231
|
+
<body>
|
|
232
|
+
<div class="container">
|
|
233
|
+
<div class="header">
|
|
234
|
+
<span class="title">Super Agent</span>
|
|
235
|
+
<span class="status" id="status">Connecting...</span>
|
|
236
|
+
</div>
|
|
237
|
+
<div class="messages" id="messages"></div>
|
|
238
|
+
<div class="input-area">
|
|
239
|
+
<input type="text" id="prompt" placeholder="@file.ts Ask something... (Press Enter to send)" autocomplete="off">
|
|
240
|
+
<button id="send">Send</button>
|
|
241
|
+
<button id="abort" style="display: none;">Stop</button>
|
|
242
|
+
</div>
|
|
243
|
+
<div class="file-context" id="fileContext" style="display: none;">
|
|
244
|
+
<button id="mentionCurrent">@ Current File</button>
|
|
245
|
+
</div>
|
|
246
|
+
</div>
|
|
247
|
+
<script src="${scriptUri}"></script>
|
|
248
|
+
</body>
|
|
249
|
+
</html>`;
|
|
250
|
+
}
|
|
251
|
+
generateId() {
|
|
252
|
+
return `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
253
|
+
}
|
|
254
|
+
dispose() {
|
|
255
|
+
for (const disposable of this.disposables) {
|
|
256
|
+
disposable.dispose();
|
|
257
|
+
}
|
|
258
|
+
this.disposables = [];
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
exports.ChatProvider = ChatProvider;
|
|
262
|
+
//# sourceMappingURL=chat-provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-provider.js","sourceRoot":"","sources":["../src/chat-provider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,+CAAiC;AAUjC,MAAa,YAAY;IAMb;IACA;IACA;IACA;IARF,QAAQ,GAAkB,EAAE,CAAC;IAC7B,WAAW,CAAiC;IAC5C,WAAW,GAAwB,EAAE,CAAC;IAE9C,YACU,OAAgC,EAChC,YAAwB,EACxB,YAA0B,EAC1B,mBAAwC;QAHxC,YAAO,GAAP,OAAO,CAAyB;QAChC,iBAAY,GAAZ,YAAY,CAAY;QACxB,iBAAY,GAAZ,YAAY,CAAc;QAC1B,wBAAmB,GAAn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