@sourcegraph/amp 0.0.1748929708-g4e0808 → 0.0.1748952139-g3a80f1

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 (49) hide show
  1. package/dist/amp.js +3 -3
  2. package/dist/client-eeeVpbOj.js +55 -0
  3. package/dist/client-eeeVpbOj.js.map +1 -0
  4. package/dist/{console-mWOvD6Pa.js → console-CN5EK-5f.js} +4195 -4179
  5. package/dist/console-CN5EK-5f.js.map +1 -0
  6. package/dist/{create_file.node-C811NWdx.js → create_file.node-BPbwLrpo.js} +2 -2
  7. package/dist/{create_file.node-C811NWdx.js.map → create_file.node-BPbwLrpo.js.map} +1 -1
  8. package/dist/{edit_file.node-BHKC-gQq.js → edit_file.node-CoKkV9T6.js} +3 -3
  9. package/dist/{edit_file.node-BHKC-gQq.js.map → edit_file.node-CoKkV9T6.js.map} +1 -1
  10. package/dist/{executable-C7hPnzew.js → executable-Dbw4UQsn.js} +2 -2
  11. package/dist/{executable-C7hPnzew.js.map → executable-Dbw4UQsn.js.map} +1 -1
  12. package/dist/{files-B8V2eCKM.js → files-vC7gbodq.js} +2 -2
  13. package/dist/{files-B8V2eCKM.js.map → files-vC7gbodq.js.map} +1 -1
  14. package/dist/{glob.node-BaOYqDt4.js → glob.node-Br1inBMB.js} +4 -4
  15. package/dist/{glob.node-BaOYqDt4.js.map → glob.node-Br1inBMB.js.map} +1 -1
  16. package/dist/{index-C8J8Ux8A.js → index-Dgb2bOc6.js} +2 -2
  17. package/dist/{index-C8J8Ux8A.js.map → index-Dgb2bOc6.js.map} +1 -1
  18. package/dist/{list_directory.node-BgRfRZbc.js → list_directory.node-DGkXRIzx.js} +2 -2
  19. package/dist/{list_directory.node-BgRfRZbc.js.map → list_directory.node-DGkXRIzx.js.map} +1 -1
  20. package/dist/{load-profile-zboUN1ze.js → load-profile-DvvdVESK.js} +2 -2
  21. package/dist/{load-profile-zboUN1ze.js.map → load-profile-DvvdVESK.js.map} +1 -1
  22. package/dist/{main-Bw6YRo_L.js → main-CcCjhyno.js} +1229 -1248
  23. package/dist/main-CcCjhyno.js.map +1 -0
  24. package/dist/{node-DoPUdUgl.js → node-BWA8OH3Y.js} +3 -3
  25. package/dist/{node-DoPUdUgl.js.map → node-BWA8OH3Y.js.map} +1 -1
  26. package/dist/{node-De4liSZz.js → node-BlIuu9mO.js} +2 -2
  27. package/dist/{node-De4liSZz.js.map → node-BlIuu9mO.js.map} +1 -1
  28. package/dist/node-CFZqx9i7.js +43 -0
  29. package/dist/node-CFZqx9i7.js.map +1 -0
  30. package/dist/{node-Cvj0SzTq.js → node-DrR1mumq.js} +4 -4
  31. package/dist/{node-Cvj0SzTq.js.map → node-DrR1mumq.js.map} +1 -1
  32. package/dist/{node-cHFAXE7T.js → node-bCOCJc2z.js} +2 -2
  33. package/dist/{node-cHFAXE7T.js.map → node-bCOCJc2z.js.map} +1 -1
  34. package/dist/{node-B-tg-yFK.js → node-uQP2zFCU.js} +3 -3
  35. package/dist/{node-B-tg-yFK.js.map → node-uQP2zFCU.js.map} +1 -1
  36. package/dist/{read_file.node-CljqDFUj.js → read_file.node-B_mwwcms.js} +2 -2
  37. package/dist/{read_file.node-CljqDFUj.js.map → read_file.node-B_mwwcms.js.map} +1 -1
  38. package/dist/{stdio-D9Zqzkf5.js → stdio-CbcJDG9x.js} +3 -3
  39. package/dist/{stdio-D9Zqzkf5.js.map → stdio-CbcJDG9x.js.map} +1 -1
  40. package/dist/storybook.js +1 -1
  41. package/dist/{undo_edit.node-BgCpAlBA.js → undo_edit.node-CymsB0Md.js} +2 -2
  42. package/dist/{undo_edit.node-BgCpAlBA.js.map → undo_edit.node-CymsB0Md.js.map} +1 -1
  43. package/package.json +1 -1
  44. package/dist/client-DM7cuALa.js +0 -35
  45. package/dist/client-DM7cuALa.js.map +0 -1
  46. package/dist/console-mWOvD6Pa.js.map +0 -1
  47. package/dist/main-Bw6YRo_L.js.map +0 -1
  48. package/dist/node-CcXhHJLX.js +0 -26
  49. package/dist/node-CcXhHJLX.js.map +0 -1
@@ -1,26 +0,0 @@
1
- #!/usr/bin/env node
2
- import { f as a } from "./client-DM7cuALa.js";
3
- import { p as u, aQ as c } from "./console-mWOvD6Pa.js";
4
- const l = ({ args: o }, { threadID: t }) => u(async (s) => {
5
- try {
6
- const r = `/api/web-search?query=${encodeURIComponent(o.query)}&numResults=${o.num_results || 5}`, e = await a(r, {
7
- method: "GET",
8
- signal: s,
9
- headers: t ? { [c]: t } : void 0
10
- });
11
- if (!e.ok) {
12
- const n = await e.text();
13
- throw new Error(`Server returned ${e.status}: ${n}`);
14
- }
15
- return {
16
- status: "done",
17
- result: await e.json()
18
- };
19
- } catch (r) {
20
- throw new Error(`Failed to perform web search: ${r.message}`);
21
- }
22
- });
23
- export {
24
- l as nodeWebSearchTool
25
- };
26
- //# sourceMappingURL=node-CcXhHJLX.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"node-CcXhHJLX.js","sources":["../../core/src/tools/builtin/web_search/node.ts"],"sourcesContent":["import { promiseFactoryToObservable } from '@sourcegraph/observable'\nimport { fetchFromAmpServer } from '../../../server-api/client'\nimport { HEADER_KEY_THREAD_ID } from '../../../server-api/headers'\nimport type { webSearchToolReg } from './common'\n\nexport const nodeWebSearchTool: NonNullable<(typeof webSearchToolReg)['fn']> = (\n\t{ args },\n\t{ threadID },\n) => {\n\treturn promiseFactoryToObservable(async (signal) => {\n\t\ttry {\n\t\t\t// Call the server endpoint using the fetchFromAmpServer helper\n\t\t\tconst url = `/api/web-search?query=${encodeURIComponent(args.query)}&numResults=${args.num_results || 5}`\n\t\t\tconst response = await fetchFromAmpServer(url, {\n\t\t\t\tmethod: 'GET',\n\t\t\t\tsignal,\n\t\t\t\theaders: threadID ? { [HEADER_KEY_THREAD_ID]: threadID } : undefined,\n\t\t\t})\n\n\t\t\tif (!response.ok) {\n\t\t\t\tconst errorText = await response.text()\n\t\t\t\tthrow new Error(`Server returned ${response.status}: ${errorText}`)\n\t\t\t}\n\n\t\t\tconst results = await response.json()\n\t\t\treturn {\n\t\t\t\tstatus: 'done' as const,\n\t\t\t\tresult: results,\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tthrow new Error(`Failed to perform web search: ${(error as Error).message}`)\n\t\t}\n\t})\n}\n"],"names":["nodeWebSearchTool","args","threadID","promiseFactoryToObservable","signal","url","response","fetchFromAmpServer","HEADER_KEY_THREAD_ID","errorText","error"],"mappings":";;;AAKO,MAAMA,IAAkE,CAC9E,EAAE,MAAAC,KACF,EAAE,UAAAC,QAEKC,EAA2B,OAAOC,MAAW;AAC/C,MAAA;AAEG,UAAAC,IAAM,yBAAyB,mBAAmBJ,EAAK,KAAK,CAAC,eAAeA,EAAK,eAAe,CAAC,IACjGK,IAAW,MAAMC,EAAmBF,GAAK;AAAA,MAC9C,QAAQ;AAAA,MACR,QAAAD;AAAA,MACA,SAASF,IAAW,EAAE,CAACM,CAAoB,GAAGN,EAAa,IAAA;AAAA,IAAA,CAC3D;AAEG,QAAA,CAACI,EAAS,IAAI;AACX,YAAAG,IAAY,MAAMH,EAAS,KAAK;AACtC,YAAM,IAAI,MAAM,mBAAmBA,EAAS,MAAM,KAAKG,CAAS,EAAE;AAAA,IAAA;AAI5D,WAAA;AAAA,MACN,QAAQ;AAAA,MACR,QAHe,MAAMH,EAAS,KAAK;AAAA,IAIpC;AAAA,WACQI,GAAO;AACf,UAAM,IAAI,MAAM,iCAAkCA,EAAgB,OAAO,EAAE;AAAA,EAAA;AAC5E,CACA;"}