@wasabeef/agentnote 0.1.4 → 0.1.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.
Files changed (2) hide show
  1. package/dist/cli.js +1 -9
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -398,26 +398,18 @@ async function readNote(commitSha) {
398
398
 
399
399
  // src/core/entry.ts
400
400
  var SCHEMA_VERSION = 1;
401
- var RESPONSE_MAX_LENGTH = 2e3;
402
401
  function calcAiRatio(commitFiles, aiFiles) {
403
402
  if (commitFiles.length === 0) return 0;
404
403
  const aiSet = new Set(aiFiles);
405
404
  const matched = commitFiles.filter((f) => aiSet.has(f));
406
405
  return Math.round(matched.length / commitFiles.length * 100);
407
406
  }
408
- function truncate(text, maxLen) {
409
- if (text.length <= maxLen) return text;
410
- return text.slice(0, maxLen) + "\u2026";
411
- }
412
407
  function buildEntry(opts) {
413
408
  return {
414
409
  v: SCHEMA_VERSION,
415
410
  session_id: opts.sessionId,
416
411
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
417
- interactions: opts.interactions.map((i) => ({
418
- prompt: i.prompt,
419
- response: i.response ? truncate(i.response, RESPONSE_MAX_LENGTH) : null
420
- })),
412
+ interactions: opts.interactions,
421
413
  files_in_commit: opts.commitFiles,
422
414
  files_by_ai: opts.aiFiles,
423
415
  ai_ratio: calcAiRatio(opts.commitFiles, opts.aiFiles)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wasabeef/agentnote",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Remember why your code changed. Link AI agent sessions to git commits.",
5
5
  "type": "module",
6
6
  "bin": {