@kodocagent/cli 0.4.3 → 0.4.4

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
@@ -11022,8 +11022,10 @@ async function cleanOldBackups(maxAgeDays = 30, baseDir) {
11022
11022
  function resolveOutputPath(targetPath) {
11023
11023
  const ext = extname(targetPath).toLowerCase();
11024
11024
  if (ext === ".hwp") {
11025
- const outputPath = targetPath.slice(0, -4) + ".hwpx";
11026
- return { outputPath, willConvertFormat: ".hwp \u2192 .hwpx" };
11025
+ return { outputPath: targetPath.slice(0, -4) + ".hwpx", willConvertFormat: ".hwp \u2192 .hwpx" };
11026
+ }
11027
+ if (ext === ".xls") {
11028
+ return { outputPath: targetPath.slice(0, -4) + ".xlsx", willConvertFormat: ".xls \u2192 .xlsx" };
11027
11029
  }
11028
11030
  return { outputPath: targetPath, willConvertFormat: void 0 };
11029
11031
  }
@@ -13116,7 +13118,7 @@ var proposeFindReplaceTool = {
13116
13118
  const remaining = countOccurrences(normAfter, normFind);
13117
13119
  if (remaining > 0) {
13118
13120
  warnings.push(
13119
- `\uC77C\uBD80 "${input.find}"(${remaining}\uACF3)\uC774 \uAD50\uCCB4\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \uD14D\uC2A4\uD2B8\uAC00 \uC5EC\uB7EC \uC11C\uC2DD \uB7F0\uC5D0 \uB098\uB258\uC5B4 \uC788\uC5B4 \uACBD\uACC4\uB97C \uAC00\uB85C\uC9C0\uB974\uB294 \uD328\uD134\uC740 \uAD50\uCCB4\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4(\uC11C\uC2DD\uC774 \uB098\uB25C \uD14D\uC2A4\uD2B8). \uC774\uBBF8 \uAD50\uCCB4\uB41C ${replacedCount}\uACF3\uC740 \uC815\uC0C1 \uBC18\uC601\uB418\uC5C8\uC2B5\uB2C8\uB2E4.`
13121
+ `\uC77C\uBD80 "${input.find}"(${remaining}\uACF3)\uC774 \uAD50\uCCB4\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \uD14D\uC2A4\uD2B8\uAC00 \uC5EC\uB7EC \uC11C\uC2DD \uB7F0\uC5D0 \uB098\uB258\uC5B4 \uC788\uC5B4 \uACBD\uACC4\uB97C \uAC00\uB85C\uC9C0\uB974\uB294 \uD328\uD134\uC740 \uAD50\uCCB4\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4(\uC11C\uC2DD\uC774 \uB098\uB25C \uD14D\uC2A4\uD2B8). \uC774\uBBF8 \uAD50\uCCB4\uB41C ${replacedCount}\uACF3\uC740 \uC815\uC0C1 \uBC18\uC601\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uB0A8\uC740 ${remaining}\uACF3\uC740 \uD45C \uC548\uC758 \uC140\uC774\uBA74 propose_cell_edit\uC73C\uB85C \uD55C \uACF3\uC529 \uC218\uC815\uD558\uAC70\uB098, \uD55C\uAE00 \uD504\uB85C\uADF8\uB7A8\uC5D0\uC11C \uC9C1\uC811 \uCC3E\uAE30\xB7\uBC14\uAFB8\uAE30\uB85C \uCC98\uB9AC\uD558\uC138\uC694.`
13120
13122
  );
13121
13123
  }
13122
13124
  }
@@ -13319,23 +13321,25 @@ var proposeSheetEditTool = {
13319
13321
  return `\uC624\uB958: \uC6CC\uD06C\uBD81 \uC800\uC7A5 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4: ${msg}`;
13320
13322
  }
13321
13323
  const stagedData = modifiedBuffer;
13322
- const stagedPath = await stageFile(ctx.sessionId, safePath, stagedData);
13324
+ const { outputPath, willConvertFormat } = resolveOutputPath(safePath);
13325
+ const stagedPath = await stageFile(ctx.sessionId, outputPath, stagedData);
13323
13326
  const proposalId = crypto.randomUUID();
13324
13327
  return {
13325
13328
  proposal: {
13326
13329
  id: proposalId,
13327
13330
  kind: "sheet-edit",
13328
- targetPath: safePath,
13331
+ targetPath: outputPath,
13329
13332
  stagedPath,
13330
13333
  summary: input.summary,
13331
13334
  diff,
13332
- warnings: []
13335
+ warnings: [],
13336
+ willConvertFormat
13333
13337
  },
13334
13338
  commit: async () => {
13335
- const backupPath = await backupFile(safePath);
13336
- await commitStaged(stagedPath, safePath);
13339
+ const backupPath = await backupFile(outputPath);
13340
+ await commitStaged(stagedPath, outputPath);
13337
13341
  const backupInfo = backupPath ? ` (\uBC31\uC5C5: ${backupPath})` : "";
13338
- return `\uC800\uC7A5 \uC644\uB8CC: ${safePath}${backupInfo}`;
13342
+ return `\uC800\uC7A5 \uC644\uB8CC: ${outputPath}${backupInfo}`;
13339
13343
  }
13340
13344
  };
13341
13345
  }
@@ -14711,6 +14715,14 @@ function createCliApprovalHandler() {
14711
14715
 
14712
14716
  // src/chat.ts
14713
14717
  var HELP_TEXT = `
14718
+ \uD560 \uC218 \uC788\uB294 \uC77C:
14719
+ \u2022 \uBB38\uC11C \uC77D\uAE30\xB7\uC694\uC57D\xB7\uAC80\uD1A0 \u2014 .hwp/.hwpx/.docx/.xlsx/.pdf (\uC608: "\uC774 \uBCF4\uB3C4\uC790\uB8CC \uC694\uC57D\uD574\uC918")
14720
+ \u2022 \uD45C\xB7\uC591\uC2DD \uC218\uC815 \u2014 \uC140 \uAC12, \uC591\uC2DD \uBE48\uCE78, \uD589\xB7\uC5F4 \uCD94\uAC00/\uC0AD\uC81C (\uC608: "\uC774 \uD45C\uC758 \uAE08\uC561\uC744 30000\uC73C\uB85C \uACE0\uCCD0\uC918")
14721
+ \u2022 \uBB38\uC11C \uC804\uCCB4 \uCC3E\uAE30\xB7\uBC14\uAFB8\uAE30 (\uC608: "'\uAD6D\uBBFC\uC8FC\uAD8C'\uC744 '\uAD6D\uBBFC\uC911\uC2EC'\uC73C\uB85C \uB2E4 \uBC14\uAFD4\uC918")
14722
+ \u2022 \uB418\uB3CC\uB9AC\uAE30 \u2014 \uC9C1\uC804 \uBCC0\uACBD\uC744 \uBC31\uC5C5\uC73C\uB85C \uBCF5\uC6D0 (\uC608: "\uBC29\uAE08 \uC218\uC815 \uB418\uB3CC\uB824\uC918")
14723
+ \u2022 \uD55C\uAD6D \uBC95\uB839 \uAE30\uBC18 \uAC80\uD1A0 (\uC608: "\uC774 \uCDE8\uC5C5\uADDC\uCE59\uC774 \uADFC\uB85C\uAE30\uC900\uBC95\uC5D0 \uB9DE\uB294\uC9C0 \uBD10\uC918")
14724
+ \u203B .hwp\uB294 \uD55C\uAE00\uC5D0\uC11C .hwpx\uB85C \uC800\uC7A5\uD55C \uD6C4 \uC218\uC815\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
14725
+
14714
14726
  \uC2AC\uB798\uC2DC \uBA85\uB839:
14715
14727
  /model \u2014 \uD504\uB85C\uBC14\uC774\uB354/\uBAA8\uB378 \uC804\uD658
14716
14728
  /context \u2014 \uD604\uC7AC \uCEE8\uD14D\uC2A4\uD2B8 \uC0AC\uC6A9\uB7C9 \uD45C\uC2DC
@@ -14833,6 +14845,11 @@ async function runChat(opts) {
14833
14845
 
14834
14846
  `)
14835
14847
  );
14848
+ process.stdout.write(
14849
+ chalk2.dim(
14850
+ '\uBB38\uC11C\uB97C \uC77D\uACE0 \uD45C\xB7\uC591\uC2DD \uC218\uC815, \uCC3E\uAE30\xB7\uBC14\uAFB8\uAE30, \uB418\uB3CC\uB9AC\uAE30\uAE4C\uC9C0 \uC790\uC5F0\uC5B4\uB85C \uC694\uCCAD\uD558\uC138\uC694. \uC608: "\uC774 \uD45C\uC758 \uD569\uACC4\uB97C \uB2E4\uC2DC \uACC4\uC0B0\uD574\uC918", "\uBC29\uAE08 \uC218\uC815 \uB418\uB3CC\uB824\uC918". \uC790\uC138\uD788: /help\n'
14851
+ )
14852
+ );
14836
14853
  while (true) {
14837
14854
  let clearActiveSpinner2 = function() {
14838
14855
  if (!sharedActiveInterval) return;
@@ -15730,7 +15747,9 @@ async function runSingleTurn(prompt) {
15730
15747
  });
15731
15748
  const tools = new ToolRegistry();
15732
15749
  for (const tool2 of createDocTools({ cwd })) {
15733
- tools.register(tool2);
15750
+ const t = tool2;
15751
+ if (t.requiresApproval) continue;
15752
+ tools.register(t);
15734
15753
  }
15735
15754
  for (const mcpTool of mcpManager.getToolDefinitions()) {
15736
15755
  tools.register(mcpTool);