@sourcegraph/amp 0.0.1749096401-g3a8a18 → 0.0.1749109595-g4e65be

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 (48) hide show
  1. package/dist/amp.js +3 -3
  2. package/dist/{client-CT0UspN7.js → client-Co7dVied.js} +2 -2
  3. package/dist/{client-CT0UspN7.js.map → client-Co7dVied.js.map} +1 -1
  4. package/dist/{console-CZXURH0C.js → console-9ChYTAuP.js} +20 -14
  5. package/dist/console-9ChYTAuP.js.map +1 -0
  6. package/dist/create_file.node-hHqtsH6T.js +22 -0
  7. package/dist/create_file.node-hHqtsH6T.js.map +1 -0
  8. package/dist/{edit_file.node-BqRltvHA.js → edit_file.node-C_QnSUCA.js} +3 -3
  9. package/dist/{edit_file.node-BqRltvHA.js.map → edit_file.node-C_QnSUCA.js.map} +1 -1
  10. package/dist/{executable-Dy1dmJR0.js → executable-Cos2zJOT.js} +2 -2
  11. package/dist/{executable-Dy1dmJR0.js.map → executable-Cos2zJOT.js.map} +1 -1
  12. package/dist/{files-yat9N0vH.js → files-DuJQGx_l.js} +2 -2
  13. package/dist/{files-yat9N0vH.js.map → files-DuJQGx_l.js.map} +1 -1
  14. package/dist/{glob.node-h1Swo4vr.js → glob.node-Ca3WEmvJ.js} +4 -4
  15. package/dist/{glob.node-h1Swo4vr.js.map → glob.node-Ca3WEmvJ.js.map} +1 -1
  16. package/dist/{index-D5lm6ANC.js → index-qB8r0Uhu.js} +2 -2
  17. package/dist/{index-D5lm6ANC.js.map → index-qB8r0Uhu.js.map} +1 -1
  18. package/dist/{list_directory.node-CEUOBF5h.js → list_directory.node-B2wxSFMa.js} +2 -2
  19. package/dist/{list_directory.node-CEUOBF5h.js.map → list_directory.node-B2wxSFMa.js.map} +1 -1
  20. package/dist/{load-profile-Dk7ZUf3s.js → load-profile-DpyLbaYS.js} +2 -2
  21. package/dist/{load-profile-Dk7ZUf3s.js.map → load-profile-DpyLbaYS.js.map} +1 -1
  22. package/dist/{main-CS_jpDsP.js → main-B4ln85Rg.js} +21 -16
  23. package/dist/main-B4ln85Rg.js.map +1 -0
  24. package/dist/{node-BtKYcfrH.js → node-BBnb2R8E.js} +3 -3
  25. package/dist/{node-BtKYcfrH.js.map → node-BBnb2R8E.js.map} +1 -1
  26. package/dist/{node-DVHX-oeS.js → node-BUT6Nvpy.js} +2 -2
  27. package/dist/{node-DVHX-oeS.js.map → node-BUT6Nvpy.js.map} +1 -1
  28. package/dist/{node-CRrSwIMO.js → node-BYuqVOkK.js} +4 -4
  29. package/dist/{node-CRrSwIMO.js.map → node-BYuqVOkK.js.map} +1 -1
  30. package/dist/{node-dAg24OS_.js → node-D6m-7fmx.js} +3 -3
  31. package/dist/{node-dAg24OS_.js.map → node-D6m-7fmx.js.map} +1 -1
  32. package/dist/{node-BJyrP3Sj.js → node-Dm9KQUgx.js} +2 -2
  33. package/dist/{node-BJyrP3Sj.js.map → node-Dm9KQUgx.js.map} +1 -1
  34. package/dist/{node-COZM4qQd.js → node-DzhEX6Qs.js} +1077 -1063
  35. package/dist/node-DzhEX6Qs.js.map +1 -0
  36. package/dist/{read_file.node-DbAEjkEn.js → read_file.node-QXBL6A9B.js} +2 -2
  37. package/dist/{read_file.node-DbAEjkEn.js.map → read_file.node-QXBL6A9B.js.map} +1 -1
  38. package/dist/{stdio-BxgTnYre.js → stdio-mZBGUxws.js} +3 -3
  39. package/dist/{stdio-BxgTnYre.js.map → stdio-mZBGUxws.js.map} +1 -1
  40. package/dist/storybook.js +1 -1
  41. package/dist/{undo_edit.node-DL1deBcE.js → undo_edit.node-CBJHZjZk.js} +2 -2
  42. package/dist/{undo_edit.node-DL1deBcE.js.map → undo_edit.node-CBJHZjZk.js.map} +1 -1
  43. package/package.json +1 -1
  44. package/dist/console-CZXURH0C.js.map +0 -1
  45. package/dist/create_file.node-Bg2Ha2Q0.js +0 -24
  46. package/dist/create_file.node-Bg2Ha2Q0.js.map +0 -1
  47. package/dist/main-CS_jpDsP.js.map +0 -1
  48. package/dist/node-COZM4qQd.js.map +0 -1
@@ -1,24 +0,0 @@
1
- #!/usr/bin/env node
2
- import d from "node:path";
3
- import { p as f, aA as l, aB as u } from "./console-CZXURH0C.js";
4
- const w = ({ args: t }, { dir: a, dirs: i, trackFileChange: c, filesystem: r }) => f(async (e) => {
5
- if (l(a), typeof t.content != "string")
6
- throw new Error("create_file: content must be specified");
7
- e.throwIfAborted();
8
- const n = await u(r, i, t.path, e), p = d.dirname(n);
9
- await r.mkdirp(p, e);
10
- let o = t.content;
11
- return o.endsWith(`
12
- `) || (o += `
13
- `), await c(n, async (s) => {
14
- await r.writeFile(s, o, e);
15
- }), {
16
- status: "done",
17
- result: `Successfully created file ${t.path}`,
18
- files: [t.path]
19
- };
20
- });
21
- export {
22
- w as nodeCreateFileTool
23
- };
24
- //# sourceMappingURL=create_file.node-Bg2Ha2Q0.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create_file.node-Bg2Ha2Q0.js","sources":["../../core/src/tools/builtin/filesystem/create_file.node.ts"],"sourcesContent":["import { promiseFactoryToObservable } from '@sourcegraph/observable'\nimport path from 'path'\nimport { checkDirURIIsFile } from '../node-helpers'\nimport type { createFileToolReg } from './create_file.common'\nimport { resolveArgumentPath } from './read_file.util'\n\nexport const nodeCreateFileTool: NonNullable<typeof createFileToolReg.fn> = (\n\t{ args },\n\t{ dir, dirs, trackFileChange, filesystem },\n) => {\n\treturn promiseFactoryToObservable(async (signal) => {\n\t\tcheckDirURIIsFile(dir)\n\t\tif (typeof args.content !== 'string') {\n\t\t\tthrow new Error('create_file: content must be specified')\n\t\t}\n\n\t\tsignal.throwIfAborted()\n\n\t\tconst fullPath = await resolveArgumentPath(filesystem, dirs, args.path, signal)\n\t\tconst dirname = path.dirname(fullPath)\n\t\tawait filesystem.mkdirp(dirname, signal)\n\n\t\tlet content = args.content\n\t\t// HACK: the Anthropic tool calling API appears to trim whitespace from around all tool args.\n\t\t// When we create files, we _almost always_ want to create them with a trailing newline.\n\t\t// More info here: https://sourcegraph.slack.com/archives/C04D0GRD1GB/p1747064252012509\n\t\tif (!content.endsWith('\\n')) {\n\t\t\tcontent += '\\n'\n\t\t}\n\t\tawait trackFileChange(fullPath, async (path) => {\n\t\t\tawait filesystem.writeFile(path, content, signal)\n\t\t})\n\t\treturn {\n\t\t\tstatus: 'done',\n\t\t\tresult: `Successfully created file ${args.path}`,\n\t\t\tfiles: [args.path],\n\t\t}\n\t})\n}\n"],"names":["nodeCreateFileTool","args","dir","dirs","trackFileChange","filesystem","promiseFactoryToObservable","signal","checkDirURIIsFile","fullPath","resolveArgumentPath","dirname","path","content"],"mappings":";;;AAMa,MAAAA,IAA+D,CAC3E,EAAE,MAAAC,KACF,EAAE,KAAAC,GAAK,MAAAC,GAAM,iBAAAC,GAAiB,YAAAC,QAEvBC,EAA2B,OAAOC,MAAW;AAE/C,MADJC,EAAkBN,CAAG,GACjB,OAAOD,EAAK,WAAY;AACrB,UAAA,IAAI,MAAM,wCAAwC;AAGzD,EAAAM,EAAO,eAAe;AAEtB,QAAME,IAAW,MAAMC,EAAoBL,GAAYF,GAAMF,EAAK,MAAMM,CAAM,GACxEI,IAAUC,EAAK,QAAQH,CAAQ;AAC/B,QAAAJ,EAAW,OAAOM,GAASJ,CAAM;AAEvC,MAAIM,IAAUZ,EAAK;AAInB,SAAKY,EAAQ,SAAS;AAAA,CAAI,MACdA,KAAA;AAAA,IAEN,MAAAT,EAAgBK,GAAU,OAAOG,MAAS;AAC/C,UAAMP,EAAW,UAAUO,GAAMC,GAASN,CAAM;AAAA,EAAA,CAChD,GACM;AAAA,IACN,QAAQ;AAAA,IACR,QAAQ,6BAA6BN,EAAK,IAAI;AAAA,IAC9C,OAAO,CAACA,EAAK,IAAI;AAAA,EAClB;AAAA,CACA;"}