@hasna/assistants 0.6.26 → 0.6.27

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 CHANGED
@@ -44085,6 +44085,7 @@ Keep it concise but comprehensive.`
44085
44085
  description: "Schedule a command (ISO time or cron)",
44086
44086
  builtin: true,
44087
44087
  selfHandled: true,
44088
+ content: "",
44088
44089
  handler: async (args, context) => {
44089
44090
  const parts = splitArgs(args);
44090
44091
  if (parts.length < 2) {
@@ -44151,6 +44152,7 @@ Keep it concise but comprehensive.`
44151
44152
  description: "List scheduled commands",
44152
44153
  builtin: true,
44153
44154
  selfHandled: true,
44155
+ content: "",
44154
44156
  handler: async (_args, context) => {
44155
44157
  const schedules = await listSchedules(context.cwd);
44156
44158
  if (schedules.length === 0) {
@@ -44181,6 +44183,7 @@ Keep it concise but comprehensive.`
44181
44183
  description: "Delete a scheduled command",
44182
44184
  builtin: true,
44183
44185
  selfHandled: true,
44186
+ content: "",
44184
44187
  handler: async (args, context) => {
44185
44188
  const id = args.trim();
44186
44189
  if (!id) {
@@ -44204,6 +44207,7 @@ Keep it concise but comprehensive.`
44204
44207
  description: "Pause a scheduled command",
44205
44208
  builtin: true,
44206
44209
  selfHandled: true,
44210
+ content: "",
44207
44211
  handler: async (args, context) => {
44208
44212
  const id = args.trim();
44209
44213
  if (!id) {
@@ -44242,6 +44246,7 @@ ${lines.join(`
44242
44246
  description: "Resume a scheduled command",
44243
44247
  builtin: true,
44244
44248
  selfHandled: true,
44249
+ content: "",
44245
44250
  handler: async (args, context) => {
44246
44251
  const id = args.trim();
44247
44252
  if (!id) {
@@ -44548,10 +44553,10 @@ No security events recorded.
44548
44553
  `;
44549
44554
  let issueTitle = "";
44550
44555
  let labels = "";
44551
- if (feedbackType === "bug" || feedbackType === "issue") {
44556
+ if (feedbackType === "bug") {
44552
44557
  issueTitle = "[Bug] ";
44553
44558
  labels = "bug";
44554
- } else if (feedbackType === "feature" || feedbackType === "request") {
44559
+ } else if (feedbackType === "feature") {
44555
44560
  issueTitle = "[Feature Request] ";
44556
44561
  labels = "enhancement";
44557
44562
  } else {
@@ -46250,7 +46255,6 @@ class AgentLoop {
46250
46255
  const toolCall = {
46251
46256
  id: generateId(),
46252
46257
  name: "bash",
46253
- type: "tool",
46254
46258
  input: {
46255
46259
  command,
46256
46260
  cwd: this.cwd,
@@ -47754,9 +47758,6 @@ class SessionRegistry {
47754
47758
  // packages/core/src/index.ts
47755
47759
  init_errors();
47756
47760
  init_retry();
47757
- init_errors();
47758
- init_src();
47759
-
47760
47761
  // packages/terminal/src/components/App.tsx
47761
47762
  init_src();
47762
47763
 
@@ -47982,11 +47983,9 @@ function Input({ onSubmit, isProcessing, queueLength = 0, commands, skills = []
47982
47983
  setValue("");
47983
47984
  setSelectedIndex(0);
47984
47985
  };
47985
- let prompt = "\u276F";
47986
47986
  let placeholder = "Type a message...";
47987
47987
  if (isProcessing) {
47988
- prompt = "\u22EF";
47989
- placeholder = queueLength > 0 ? "Type to send (Enter) or queue (Tab) \xB7 Shift+Enter to interrupt..." : "Type to send (Enter) or queue (Tab) \xB7 Shift+Enter to interrupt...";
47988
+ placeholder = queueLength > 0 ? "Type to queue (Tab) or interrupt (Shift+Enter)..." : "Type to interrupt (Shift+Enter)...";
47990
47989
  }
47991
47990
  const truncateDescription = (desc, maxLen = 60) => {
47992
47991
  if (desc.length <= maxLen)
@@ -48007,29 +48006,56 @@ function Input({ onSubmit, isProcessing, queueLength = 0, commands, skills = []
48007
48006
  };
48008
48007
  const visibleSkills = getVisibleItems(filteredSkills);
48009
48008
  const visibleCommands = getVisibleItems(filteredCommands);
48009
+ const lines = value.split(`
48010
+ `);
48011
+ const lineCount = lines.length;
48010
48012
  return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Box_default, {
48011
48013
  flexDirection: "column",
48012
48014
  marginTop: 1,
48013
48015
  children: [
48014
48016
  /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Box_default, {
48017
+ children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Text, {
48018
+ dimColor: true,
48019
+ children: "\u2500".repeat(80)
48020
+ }, undefined, false, undefined, this)
48021
+ }, undefined, false, undefined, this),
48022
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Box_default, {
48023
+ paddingY: 0,
48015
48024
  children: [
48016
48025
  /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Text, {
48017
48026
  dimColor: isProcessing,
48018
- children: [
48019
- prompt,
48020
- " "
48021
- ]
48022
- }, undefined, true, undefined, this),
48023
- /* @__PURE__ */ jsx_dev_runtime.jsxDEV(build_default, {
48024
- value,
48025
- onChange: handleChange,
48026
- onSubmit: handleSubmit,
48027
- placeholder
48027
+ color: isProcessing ? undefined : "cyan",
48028
+ children: "> "
48029
+ }, undefined, false, undefined, this),
48030
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Box_default, {
48031
+ flexGrow: 1,
48032
+ children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(build_default, {
48033
+ value,
48034
+ onChange: handleChange,
48035
+ onSubmit: handleSubmit,
48036
+ placeholder
48037
+ }, undefined, false, undefined, this)
48028
48038
  }, undefined, false, undefined, this)
48029
48039
  ]
48030
48040
  }, undefined, true, undefined, this),
48041
+ lineCount > 1 && /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Box_default, {
48042
+ marginLeft: 2,
48043
+ children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Text, {
48044
+ dimColor: true,
48045
+ children: [
48046
+ "(",
48047
+ lineCount,
48048
+ " lines)"
48049
+ ]
48050
+ }, undefined, true, undefined, this)
48051
+ }, undefined, false, undefined, this),
48052
+ /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Box_default, {
48053
+ children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Text, {
48054
+ dimColor: true,
48055
+ children: "\u2500".repeat(80)
48056
+ }, undefined, false, undefined, this)
48057
+ }, undefined, false, undefined, this),
48031
48058
  isProcessing && /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Box_default, {
48032
- marginTop: 1,
48033
48059
  marginLeft: 2,
48034
48060
  children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Text, {
48035
48061
  dimColor: true,
@@ -48133,8 +48159,9 @@ function Markdown({ content, preRendered = false }) {
48133
48159
  children: content
48134
48160
  }, undefined, false, undefined, this);
48135
48161
  }
48136
- const { columns } = use_stdout_default();
48137
- const maxWidth = columns ? Math.max(20, columns - 2) : undefined;
48162
+ const { stdout } = use_stdout_default();
48163
+ const columns = stdout?.columns ?? 80;
48164
+ const maxWidth = Math.max(20, columns - 2);
48138
48165
  const rendered = parseMarkdown(content, { maxWidth });
48139
48166
  return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Text, {
48140
48167
  children: rendered
@@ -48395,7 +48422,8 @@ function renderBlockSection(section, maxWidth) {
48395
48422
  if (section.kind === "grid") {
48396
48423
  const adjustedWidth2 = maxWidth ? Math.max(20, maxWidth - section.indent.length) : undefined;
48397
48424
  if (section.cards.length === 0) {
48398
- return renderCard({ type: "note", title: "Grid", body: section.body }, adjustedWidth2, section.indent);
48425
+ return renderCard({ type: "note", title: "Grid", body: section.body }, adjustedWidth2, section.indent).join(`
48426
+ `);
48399
48427
  }
48400
48428
  return renderCardGrid(section.cards, section.columns, adjustedWidth2, section.indent);
48401
48429
  }
@@ -48904,8 +48932,9 @@ function Messages3({
48904
48932
  queuedMessageIds
48905
48933
  }) {
48906
48934
  const [now2, setNow] = import_react24.useState(Date.now());
48907
- const { columns } = use_stdout_default();
48908
- const messageWidth = columns ? Math.max(10, columns - 2) : undefined;
48935
+ const { stdout } = use_stdout_default();
48936
+ const columns = stdout?.columns ?? 80;
48937
+ const messageWidth = Math.max(10, columns - 2);
48909
48938
  const combinedMessages = import_react24.useMemo(() => [...messages, ...streamingMessages], [messages, streamingMessages]);
48910
48939
  const lineSpans = import_react24.useMemo(() => {
48911
48940
  let cursor = 0;
@@ -49059,7 +49088,7 @@ function Messages3({
49059
49088
  /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
49060
49089
  flexGrow: 1,
49061
49090
  children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Markdown, {
49062
- content: currentResponse
49091
+ content: currentResponse ?? ""
49063
49092
  }, undefined, false, undefined, this)
49064
49093
  }, undefined, false, undefined, this)
49065
49094
  ]
@@ -49212,8 +49241,9 @@ function ToolCallPanel({
49212
49241
  }) {
49213
49242
  if (toolCalls.length === 0)
49214
49243
  return null;
49215
- const { columns } = use_stdout_default();
49216
- const panelWidth = columns ? Math.max(24, columns - 4) : undefined;
49244
+ const { stdout } = use_stdout_default();
49245
+ const columns = stdout?.columns ?? 80;
49246
+ const panelWidth = Math.max(24, columns - 4);
49217
49247
  const resultMap = new Map;
49218
49248
  for (const result of toolResults || []) {
49219
49249
  resultMap.set(result.toolCallId, result);
@@ -50157,7 +50187,9 @@ function buildDisplayMessages(messages, chunkLines, wrapChars, options) {
50157
50187
  }
50158
50188
  function App2({ cwd: cwd2, version }) {
50159
50189
  const { exit } = use_app_default();
50160
- const { rows, columns } = use_stdout_default();
50190
+ const { stdout } = use_stdout_default();
50191
+ const rows = stdout?.rows ?? 24;
50192
+ const columns = stdout?.columns ?? 80;
50161
50193
  const [registry] = import_react29.useState(() => new SessionRegistry);
50162
50194
  const registryRef = import_react29.useRef(registry);
50163
50195
  const [activeSessionId, setActiveSessionId] = import_react29.useState(null);
@@ -51383,4 +51415,4 @@ if (options.print !== null) {
51383
51415
  });
51384
51416
  }
51385
51417
 
51386
- //# debugId=753207CF52EF9C5F64756E2164756E21
51418
+ //# debugId=29930EA4036DA53D64756E2164756E21