-
-
+
+
Task #{{ item.id }}
- Options:
- {{ key }}:
- {{
+ {{
value.length > 20
? value.substring(0, 20) + "..."
: value
@@ -94,11 +94,11 @@
-
+
- Task Input
@@ -137,7 +137,7 @@
- Task Output
@@ -176,9 +176,7 @@
>
@@ -66,6 +65,10 @@ export default {
type: Object,
required: true,
},
+ tabId: {
+ type: Number,
+ default: null,
+ },
},
data() {
return {
@@ -136,6 +139,7 @@ export default {
command: "shell",
description: "Tasks the specified agent to execute a shell command",
usage: "shell [--literal / -l] ",
+ // For interactive shell sessions, use the Shell tab
},
{
command: "ps",
@@ -224,8 +228,6 @@ export default {
usage: "back",
},
],
- isShellMenu: false,
- currentDir: "loading...",
};
},
computed: {
@@ -250,8 +252,6 @@ export default {
let body = "";
if (this.currentModule) {
body = this.colorizeText(`usemodule/${this.currentModule.id}`, "red");
- } else if (this.isShellMenu) {
- body = this.colorizeText(this.currentDir, "green");
} else {
body = this.colorizeText(this.agent.session_id, "red");
}
@@ -290,14 +290,8 @@ export default {
},
methods: {
storageName() {
- return `terminal-history-${this.agent.session_id}`;
- },
- ctrlCHandler(_event) {
- if (this.isShellMenu) {
- this.isShellMenu = false;
- }
- this.addLine(`${this.currentPrompt} ${this.currentInput}`);
- this.currentInput = "";
+ const suffix = this.tabId != null ? `-${this.tabId}` : "";
+ return `terminal-history-${this.agent.session_id}${suffix}`;
},
positionSuggestions() {
const { inputField } = this.$refs;
@@ -386,10 +380,6 @@ export default {
}
},
async generateSuggestions() {
- if (this.isShellMenu) {
- this.suggestions = [];
- return;
- }
const query = this.currentInput.toLowerCase().trim();
if (!query) {
@@ -512,9 +502,7 @@ export default {
const command = commandParts[0];
const args = commandParts.slice(1);
- if (this.isShellMenu) {
- this.shellCommandOperator(this.currentInput);
- } else if (command === "back") {
+ if (command === "back") {
if (this.currentModule) {
this.currentModule = null;
} else {
@@ -562,10 +550,9 @@ export default {
break;
case "shell":
if (args.length < 1) {
- this.isShellMenu = true;
- this.updateCurrentDirectory();
- this.addInfo(`Shell session started on ${this.agent.session_id}`);
- this.addInfo("Exit shell menu with Ctrl+C.");
+ this.addError(
+ "Usage: shell [--literal / -l] . Use the Shell tab for an interactive session.",
+ );
} else {
this.runShellCommand(commandParts.slice(1).join(" "));
}
@@ -799,61 +786,6 @@ export default {
return res;
},
- getDirectoryCommand() {
- if (this.agent.language === "python") {
- return "echo $PWD";
- }
- if (this.agent.language === "ironpython") {
- return "cd .";
- }
- return "(Resolve-Path .\\).Path";
- },
- async updateCurrentDirectory() {
- this.currentDir = "loading...";
- const response = await agentTaskApi.shell(
- this.agent.session_id,
- this.getDirectoryCommand(),
- );
-
- const complete = await this.pollForResult(response.id, { print: false });
-
- if (complete) {
- // eslint-disable-next-line prefer-destructuring
- this.currentDir = (
- await this.checkTaskComplete(response.id)
- ).output.split("\r")[0];
- }
- },
- // This is for when in the shell menu.
- // The other function is for when not in the shell menu.
- async shellCommandOperator(stdin) {
- let response = null;
- try {
- if (stdin.trim() === "sysinfo") {
- response = await agentTaskApi.sysinfo(this.agent.session_id);
- } else {
- response = await agentTaskApi.shell(
- this.agent.session_id,
- stdin,
- false,
- );
- }
- } catch (error) {
- this.addError(`Error executing command: ${error.message}`);
- return;
- }
-
- const complete = await this.pollForResult(response.id, { print: false });
-
- if (["cd", "set-location"].includes(stdin.toLowerCase().split(" ")[0])) {
- this.updateCurrentDirectory();
- return;
- }
-
- if (complete) {
- this.addLine(complete.output, "indent-5-spaces");
- }
- },
async checkTaskComplete(taskId) {
try {
const task = await agentTaskApi.getTask(this.agent.session_id, taskId);
diff --git a/src/components/agents/AgentUploadDialog.vue b/src/components/agents/AgentUploadDialog.vue
index 1ec05b13..6326d3b3 100644
--- a/src/components/agents/AgentUploadDialog.vue
+++ b/src/components/agents/AgentUploadDialog.vue
@@ -2,7 +2,7 @@
- Upload To Agent
+ Upload To Agent
Only showing files smaller than {{ formatBytes(maxBytes) }}
diff --git a/src/components/agents/AgentsList.vue b/src/components/agents/AgentsList.vue
index c33d3ff6..b515e50d 100644
--- a/src/components/agents/AgentsList.vue
+++ b/src/components/agents/AgentsList.vue
@@ -150,8 +150,8 @@ export default {
{ color: "red" },
)
) {
- this.selected.forEach((agent) => {
- this.agentStore.killAgent({ sessionId: agent.session_id });
+ this.selected.forEach((sessionId) => {
+ this.agentStore.killAgent({ sessionId });
});
this.snack.success(
`${this.selected.length} agents tasked to run TASK_EXIT.`,
diff --git a/src/components/agents/ExecuteModuleDialog.vue b/src/components/agents/ExecuteModuleDialog.vue
index cfc133a6..8e030995 100644
--- a/src/components/agents/ExecuteModuleDialog.vue
+++ b/src/components/agents/ExecuteModuleDialog.vue
@@ -2,7 +2,7 @@
-
+
+
+
+
+
+
+ {{ tab.name || `${label} ${index + 1}` }}
+
+ fa-times
+
+
+
+
+ fa-plus
+
+
+
+
+
+
+ fa-pen
+
+ Rename
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/plugins/PluginMarketplace.vue b/src/components/plugins/PluginMarketplace.vue
index f0c0faf8..b8a411c0 100644
--- a/src/components/plugins/PluginMarketplace.vue
+++ b/src/components/plugins/PluginMarketplace.vue
@@ -9,7 +9,7 @@
/>
-
+
-
+
diff --git a/src/components/plugins/PluginTasksTable.vue b/src/components/plugins/PluginTasksTable.vue
index 692af676..2a15eb5b 100644
--- a/src/components/plugins/PluginTasksTable.vue
+++ b/src/components/plugins/PluginTasksTable.vue
@@ -29,8 +29,8 @@
-
-
+
+
Task #{{ item.id }}
- Options:
- {{ key }}:
- {{ value }}
+ {{ value }}
@@ -90,11 +90,11 @@
-
+
- Task Input
@@ -133,7 +133,7 @@
- Task Output
@@ -172,9 +172,7 @@
>
-
+
-
+
diff --git a/src/plugins/vuetify.js b/src/plugins/vuetify.js
index ff0cef35..222f0116 100644
--- a/src/plugins/vuetify.js
+++ b/src/plugins/vuetify.js
@@ -1,5 +1,4 @@
import { createVuetify } from "vuetify";
-import * as labsComponents from "vuetify/labs/components";
import { aliases } from "vuetify/iconsets/fa";
import "vuetify/styles";
import "@mdi/font/css/materialdesignicons.css";
@@ -31,8 +30,9 @@ const autoIconComponent = {
};
export default createVuetify({
- components: {
- ...labsComponents,
+ defaults: {
+ VDataTable: { density: "comfortable", hover: true },
+ VDataTableServer: { density: "comfortable", hover: true },
},
theme: {
defaultTheme: "dark",
diff --git a/src/views/AgentEdit.vue b/src/views/AgentEdit.vue
index 2dfe9a05..3dcde5a0 100644
--- a/src/views/AgentEdit.vue
+++ b/src/views/AgentEdit.vue
@@ -194,11 +194,12 @@
-
+
-
+
@@ -296,12 +303,13 @@
| |