@xagent/x-cli 1.2.4 → 1.2.5

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## 1.2.4 – Revolutionary Optimization & Agent Self-Testing
1
+ ## 1.2.5 – Revolutionary Optimization & Agent Self-Testing
2
2
 
3
3
  🧪 **INSANE BREAKTHROUGH**: **Agent Self-Testing methodology** - First AI that can test itself and iterate to perfection!
4
4
  🚀 **MASSIVE BREAKTHROUGH**: Revolutionary Native Text Operations discovered - **10.9x token savings** potential!
package/dist/index.js CHANGED
@@ -27092,7 +27092,7 @@ var init_package = __esm({
27092
27092
  package_default = {
27093
27093
  type: "module",
27094
27094
  name: "@xagent/one-shot",
27095
- version: "1.2.4",
27095
+ version: "1.2.5",
27096
27096
  description: "An open-source AI agent that brings advanced AI capabilities directly into your terminal with automatic documentation updates.",
27097
27097
  main: "dist/index.js",
27098
27098
  module: "dist/index.js",
@@ -30498,7 +30498,7 @@ function InlineMarkdown({ content }) {
30498
30498
  return /* @__PURE__ */ jsx(Text, { wrap: "wrap", dimColor: false, children: lines.map((line, lineIndex) => {
30499
30499
  const parts = parseInlineMarkdown(line);
30500
30500
  if (parts.length === 0) {
30501
- return null;
30501
+ return /* @__PURE__ */ jsx(React4.Fragment, { children: lineIndex > 0 && "\n\n" }, lineIndex);
30502
30502
  }
30503
30503
  return /* @__PURE__ */ jsxs(React4.Fragment, { children: [
30504
30504
  lineIndex > 0 && "\n",
@@ -30655,7 +30655,7 @@ function AssistantMessageEntry({ entry, verbosityLevel: _verbosityLevel }) {
30655
30655
  return null;
30656
30656
  }
30657
30657
  return /* @__PURE__ */ jsx(Box, { flexDirection: "column", marginTop: 1, children: /* @__PURE__ */ jsxs(Box, { flexDirection: "row", alignItems: "flex-start", children: [
30658
- /* @__PURE__ */ jsx(Text, { color: inkColors.text, children: "\u23FA " }),
30658
+ /* @__PURE__ */ jsx(Text, { color: "gray", children: "\u23BF " }),
30659
30659
  /* @__PURE__ */ jsxs(Box, { flexDirection: "column", width: "100%", children: [
30660
30660
  /* @__PURE__ */ jsx(MarkdownRenderer, { content: processedContent.trim() }),
30661
30661
  entry.isStreaming && /* @__PURE__ */ jsx(Text, { color: "cyan", children: "\u2588" }),
@@ -30667,7 +30667,6 @@ var handleLongContent;
30667
30667
  var init_assistant_message_entry = __esm({
30668
30668
  "src/ui/components/chat-entries/assistant-message-entry.tsx"() {
30669
30669
  init_markdown_renderer();
30670
- init_colors();
30671
30670
  handleLongContent = (content, maxLength = 5e3) => {
30672
30671
  if (content.length <= maxLength) {
30673
30672
  return { content, isTruncated: false };
@@ -31253,7 +31252,7 @@ function ToolCallEntry({ entry, verbosityLevel, explainLevel }) {
31253
31252
  const useClaudeCodeFormat = verbosityLevel === "quiet" && brevitySummary.hasContent;
31254
31253
  return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginTop: 1, children: [
31255
31254
  /* @__PURE__ */ jsxs(Box, { children: [
31256
- /* @__PURE__ */ jsx(Text, { color: "magenta", children: "\u23FA" }),
31255
+ /* @__PURE__ */ jsx(Text, { color: "gray", children: "\u23BF" }),
31257
31256
  /* @__PURE__ */ jsxs(Text, { color: "white", children: [
31258
31257
  " ",
31259
31258
  filePath ? `${actionName}(${filePath})` : actionName
@@ -31272,9 +31271,9 @@ function ToolCallEntry({ entry, verbosityLevel, explainLevel }) {
31272
31271
  brevitySummary.expansionHint
31273
31272
  ] }) })
31274
31273
  ) : shouldShowToolContent && /* @__PURE__ */ jsx(Box, { marginLeft: 2, flexDirection: "column", children: isExecuting ? /* @__PURE__ */ jsx(Text, { color: "cyan", children: "\u23BF Executing..." }) : shouldShowFileContent && shouldShowFullContent ? /* @__PURE__ */ jsx(Box, { flexDirection: "column", children: !isExpanded ? /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
31275
- /* @__PURE__ */ jsxs(Text, { color: "gray", children: [
31276
- "\u23BF ",
31277
- preview
31274
+ /* @__PURE__ */ jsxs(Box, { flexDirection: "row", alignItems: "flex-start", children: [
31275
+ /* @__PURE__ */ jsx(Text, { color: "gray", children: "\u23BF " }),
31276
+ /* @__PURE__ */ jsx(Box, { flexDirection: "column", width: "100%", children: /* @__PURE__ */ jsx(MarkdownRenderer, { content: preview }) })
31278
31277
  ] }),
31279
31278
  hasMore && /* @__PURE__ */ jsxs(Text, { color: "gray", children: [
31280
31279
  "\u2026 +",
@@ -31291,21 +31290,21 @@ function ToolCallEntry({ entry, verbosityLevel, explainLevel }) {
31291
31290
  entry.content.split("\n")[0]
31292
31291
  ] })
31293
31292
  ) : !shouldShowFullContent ? /* @__PURE__ */ jsx(Text, { color: "gray", children: "\u23BF Completed" }) : !isExpanded && hasMore ? /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
31294
- /* @__PURE__ */ jsxs(Text, { color: "gray", children: [
31295
- "\u23BF ",
31296
- preview
31293
+ /* @__PURE__ */ jsxs(Box, { flexDirection: "row", alignItems: "flex-start", children: [
31294
+ /* @__PURE__ */ jsx(Text, { color: "gray", children: "\u23BF " }),
31295
+ /* @__PURE__ */ jsx(Box, { flexDirection: "column", width: "100%", children: /* @__PURE__ */ jsx(MarkdownRenderer, { content: preview }) })
31297
31296
  ] }),
31298
31297
  /* @__PURE__ */ jsxs(Text, { color: "gray", children: [
31299
31298
  "\u2026 +",
31300
31299
  totalLines - 3,
31301
31300
  " lines (ctrl+r to expand)"
31302
31301
  ] })
31303
- ] }) : !isExpanded ? /* @__PURE__ */ jsxs(Text, { color: "gray", children: [
31304
- "\u23BF ",
31305
- preview
31306
- ] }) : /* @__PURE__ */ jsxs(Text, { color: "gray", children: [
31307
- "\u23BF ",
31308
- formatToolContent(entry.content, toolName)
31302
+ ] }) : !isExpanded ? /* @__PURE__ */ jsxs(Box, { flexDirection: "row", alignItems: "flex-start", children: [
31303
+ /* @__PURE__ */ jsx(Text, { color: "gray", children: "\u23BF " }),
31304
+ /* @__PURE__ */ jsx(Box, { flexDirection: "column", width: "100%", children: /* @__PURE__ */ jsx(MarkdownRenderer, { content: preview }) })
31305
+ ] }) : /* @__PURE__ */ jsxs(Box, { flexDirection: "row", alignItems: "flex-start", children: [
31306
+ /* @__PURE__ */ jsx(Text, { color: "gray", children: "\u23BF " }),
31307
+ /* @__PURE__ */ jsx(Box, { flexDirection: "column", width: "100%", children: /* @__PURE__ */ jsx(MarkdownRenderer, { content: formatToolContent(entry.content, toolName) }) })
31309
31308
  ] }) }),
31310
31309
  shouldShowDiff && !isExecuting && shouldShowFullContent && !useClaudeCodeFormat && /* @__PURE__ */ jsx(Box, { marginLeft: 4, flexDirection: "column", children: /* @__PURE__ */ jsx(
31311
31310
  DiffRenderer,
@@ -31323,6 +31322,7 @@ var init_tool_call_entry = __esm({
31323
31322
  init_diff_renderer();
31324
31323
  init_file_content_renderer();
31325
31324
  init_tool_brevity_service();
31325
+ init_markdown_renderer();
31326
31326
  truncateContent2 = (content, maxLength = 100) => {
31327
31327
  if (process.env.COMPACT !== "1") return content;
31328
31328
  return content.length > maxLength ? content.substring(0, maxLength) + "..." : content;
@@ -32871,7 +32871,7 @@ var require_package = __commonJS({
32871
32871
  module.exports = {
32872
32872
  type: "module",
32873
32873
  name: "@xagent/one-shot",
32874
- version: "1.2.4",
32874
+ version: "1.2.5",
32875
32875
  description: "An open-source AI agent that brings advanced AI capabilities directly into your terminal with automatic documentation updates.",
32876
32876
  main: "dist/index.js",
32877
32877
  module: "dist/index.js",
@@ -33136,7 +33136,7 @@ try {
33136
33136
  const chatEntries = await agent.processUserMessage(options.prompt);
33137
33137
  for (const entry of chatEntries) {
33138
33138
  if (entry.type === "assistant" && entry.content) {
33139
- console.log(renderMarkdownToConsole2(entry.content));
33139
+ console.log(chalk2.gray("\u23BF ") + renderMarkdownToConsole2(entry.content));
33140
33140
  }
33141
33141
  }
33142
33142
  } catch (error) {