larkcc 0.12.1 → 0.12.3

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/CHANGELOG.md CHANGED
@@ -7,11 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.12.3] - 2026-05-09
11
+
12
+ ### Fixed
13
+
14
+ - Suppress SDK warning for unhandled `im.message.reaction.created_v1` / `deleted_v1` events
15
+
16
+ ## [0.12.2] - 2026-05-09
17
+
18
+ ### Added
19
+
20
+ - Format tool result content by type: Read results use language-tagged code blocks (auto-detected from file extension), Bash results use bash code blocks
21
+ - Increase tool result truncation threshold from 500 to 2000 characters
22
+
10
23
  ## [0.12.1] - 2026-05-09
11
24
 
12
25
  ### Added
13
26
 
14
27
  - Tool result collapsible panels in CardKit mode: each tool call is shown as a collapsed panel with result preview in the final card
28
+ - Format tool result content by type: Read results use language-tagged code blocks (auto-detected from file extension), Bash results use bash code blocks
29
+ - Increase tool result truncation threshold from 500 to 2000 characters
15
30
 
16
31
  ### Fixed
17
32
 
package/dist/index.js CHANGED
@@ -136909,8 +136909,23 @@ function buildThinkingPanel(options) {
136909
136909
  { tag: "hr" }
136910
136910
  ];
136911
136911
  }
136912
+ function detectLangFromPath(filePath) {
136913
+ const ext = filePath.split(".").pop()?.toLowerCase() ?? "";
136914
+ return EXT_LANG_MAP[ext] ?? "";
136915
+ }
136916
+ function formatToolContent(toolName, detail, result) {
136917
+ if (toolName === "Read") {
136918
+ const lang = detectLangFromPath(detail);
136919
+ return "```" + lang + "\n" + result + "\n```";
136920
+ }
136921
+ if (toolName === "Bash") {
136922
+ return "```bash\n" + result + "\n```";
136923
+ }
136924
+ return result;
136925
+ }
136912
136926
  function buildToolResultPanel(entry) {
136913
- const preview = entry.resultPreview.length > TOOL_RESULT_TRUNCATE ? truncateSafely(entry.resultPreview, TOOL_RESULT_TRUNCATE, "\n...") : entry.resultPreview;
136927
+ const raw = entry.resultPreview.length > TOOL_RESULT_TRUNCATE ? truncateSafely(entry.resultPreview, TOOL_RESULT_TRUNCATE, "\n...") : entry.resultPreview;
136928
+ const content = formatToolContent(entry.toolName, entry.detail, raw);
136914
136929
  const headerTitle = entry.detail ? `${entry.label} \u2014 ${entry.detail}` : entry.label;
136915
136930
  return {
136916
136931
  tag: "collapsible_panel",
@@ -136936,7 +136951,7 @@ function buildToolResultPanel(entry) {
136936
136951
  elements: [
136937
136952
  {
136938
136953
  tag: "markdown",
136939
- content: preview,
136954
+ content,
136940
136955
  text_size: "notation"
136941
136956
  }
136942
136957
  ]
@@ -136946,13 +136961,53 @@ function buildToolPanels(results) {
136946
136961
  if (results.length === 0) return [];
136947
136962
  return results.map((r2) => buildToolResultPanel(r2));
136948
136963
  }
136949
- var THINKING_OVERFLOW_TRUNCATE, TOOL_RESULT_TRUNCATE;
136964
+ var THINKING_OVERFLOW_TRUNCATE, TOOL_RESULT_TRUNCATE, EXT_LANG_MAP;
136950
136965
  var init_duration = __esm({
136951
136966
  "src/format/duration.ts"() {
136952
136967
  "use strict";
136953
136968
  init_card_optimize();
136954
136969
  THINKING_OVERFLOW_TRUNCATE = 3e3;
136955
- TOOL_RESULT_TRUNCATE = 500;
136970
+ TOOL_RESULT_TRUNCATE = 2e3;
136971
+ EXT_LANG_MAP = {
136972
+ ts: "typescript",
136973
+ tsx: "typescript",
136974
+ js: "javascript",
136975
+ jsx: "javascript",
136976
+ mjs: "javascript",
136977
+ py: "python",
136978
+ go: "go",
136979
+ rs: "rust",
136980
+ java: "java",
136981
+ json: "json",
136982
+ yaml: "yaml",
136983
+ yml: "yaml",
136984
+ md: "markdown",
136985
+ html: "html",
136986
+ htm: "html",
136987
+ css: "css",
136988
+ sql: "sql",
136989
+ sh: "bash",
136990
+ bash: "bash",
136991
+ zsh: "bash",
136992
+ xml: "xml",
136993
+ toml: "toml",
136994
+ ini: "ini",
136995
+ c: "c",
136996
+ h: "c",
136997
+ cpp: "cpp",
136998
+ cc: "cpp",
136999
+ cxx: "cpp",
137000
+ hpp: "cpp",
137001
+ rb: "ruby",
137002
+ php: "php",
137003
+ swift: "swift",
137004
+ kt: "kotlin",
137005
+ kts: "kotlin",
137006
+ dart: "dart",
137007
+ dockerfile: "dockerfile",
137008
+ makefile: "makefile",
137009
+ diff: "diff"
137010
+ };
136956
137011
  }
136957
137012
  });
136958
137013
 
@@ -137878,7 +137933,7 @@ var VERSION3;
137878
137933
  var init_version = __esm({
137879
137934
  "src/version.ts"() {
137880
137935
  "use strict";
137881
- VERSION3 = "0.12.1";
137936
+ VERSION3 = "0.12.3";
137882
137937
  }
137883
137938
  });
137884
137939
 
@@ -155693,7 +155748,7 @@ async function runAgent(prompt2, cwd2, config2, client, chatId, rootMsgId, image
155693
155748
  const detail2 = formatInput(block.name, block.input ?? {});
155694
155749
  logger.tool(block.name, detail2);
155695
155750
  await cardkitCtrl?.updateStatus(`<text_tag color='orange'>${label2}</text_tag> \`${detail2}\``);
155696
- cardkitToolResults.push({ id: block.id, label: label2, detail: detail2 });
155751
+ cardkitToolResults.push({ id: block.id, name: block.name, label: label2, detail: detail2 });
155697
155752
  break;
155698
155753
  }
155699
155754
  if (SILENT_TOOLS.has(block.name)) break;
@@ -155816,7 +155871,7 @@ async function runAgent(prompt2, cwd2, config2, client, chatId, rootMsgId, image
155816
155871
  toolCount: toolCallCount
155817
155872
  },
155818
155873
  headerIconImgKey: config2.header_icon_img_key,
155819
- toolResults: cardkitToolResults.filter((t) => t.resultPreview !== void 0).map(({ label, detail, resultPreview }) => ({ label, detail, resultPreview }))
155874
+ toolResults: cardkitToolResults.filter((t) => t.resultPreview !== void 0).map(({ name, label, detail, resultPreview }) => ({ toolName: name, label, detail, resultPreview }))
155820
155875
  };
155821
155876
  if (cardkitCtrl) {
155822
155877
  await cardkitCtrl.complete(finalContent, completeOptions);
@@ -156926,7 +156981,11 @@ async function startApp(cwd2, config2, profile2, continueSession = false, force
156926
156981
  });
156927
156982
  wsClient.start({
156928
156983
  eventDispatcher: new EventDispatcher({}).register({
156929
- "im.message.receive_v1": handler
156984
+ "im.message.receive_v1": handler,
156985
+ "im.message.reaction.created_v1": () => {
156986
+ },
156987
+ "im.message.reaction.deleted_v1": () => {
156988
+ }
156930
156989
  })
156931
156990
  });
156932
156991
  logger.success("Feishu connected! Waiting for messages...");