@agent-smith/cli 0.0.14 → 0.0.15

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.
@@ -35,7 +35,6 @@ let cmds = {
35
35
  t: {
36
36
  cmd: _executeTaskCmd,
37
37
  description: "execute a task",
38
- args: "arguments: \n-task (required): the task name\n-args: prompt and other arguments if any for the task"
39
38
  },
40
39
  j: {
41
40
  cmd: _executeJobCmd,
@@ -66,7 +65,6 @@ function initAliases() {
66
65
  _cmds[alias.name] = {
67
66
  cmd: (args = [], options) => _executeTaskCmd([alias.name, ...args], options),
68
67
  description: "task: " + alias.name,
69
- args: "arguments: \n-args: prompt and other arguments if any for the task"
70
68
  };
71
69
  break;
72
70
  case "action":
@@ -1,16 +1,19 @@
1
1
  import { brain, initAgent, taskBuilder } from "../../agent.js";
2
2
  import { getFeatureSpec } from "../../state/features.js";
3
- import { isDebug, runMode } from "../../state/state.js";
4
- import { initTaskVars, readTask } from "./utils.js";
3
+ import { inputMode, isDebug, runMode } from "../../state/state.js";
4
+ import { initTaskVars, readPromptFile, readTask } from "./utils.js";
5
5
  import { readClipboard } from "../sys/clipboard.js";
6
6
  async function executeTaskCmd(args = [], options = {}) {
7
7
  await initAgent(runMode.value);
8
8
  const name = args.shift();
9
9
  const params = args.filter((x) => x.length > 0);
10
10
  let pr;
11
- if (options?.Ic == true) {
11
+ if (options?.Ic == true || inputMode.value == "clipboard") {
12
12
  pr = await readClipboard();
13
13
  }
14
+ else if (options.Pf || inputMode.value == "promptfile") {
15
+ pr = readPromptFile();
16
+ }
14
17
  else if (params.length > 0) {
15
18
  pr = params.shift();
16
19
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@agent-smith/cli",
3
3
  "description": "Agent Smith: terminal client for language model agents",
4
4
  "repository": "https://github.com/synw/agent-smith",
5
- "version": "0.0.14",
5
+ "version": "0.0.15",
6
6
  "scripts": {
7
7
  "buildrl": "rm -rf dist/* && rollup -c",
8
8
  "build": "rm -rf dist/* && tsc",