@daniel156161/prism 0.2.100 → 0.2.105

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 (1248) hide show
  1. package/README.md +2 -2
  2. package/dist/pi/pi-env.d.ts +1 -1
  3. package/dist/pi/pi-env.js +1 -1
  4. package/dist/prism-extensions/integrations/ai-memory-system.js +16 -9
  5. package/dist/prism-extensions/integrations/ai-memory-system.js.map +1 -1
  6. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
  7. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +23 -25
  8. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -1
  9. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts.map +1 -1
  10. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +3 -1
  11. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js.map +1 -1
  12. package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.d.ts +3 -2
  13. package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.d.ts.map +1 -1
  14. package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js +13 -3
  15. package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js.map +1 -1
  16. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.d.ts.map +1 -1
  17. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.js +14 -1
  18. package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.js.map +1 -1
  19. package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +3 -2
  20. package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -1
  21. package/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +1 -1
  22. package/node_modules/@earendil-works/pi-agent-core/package.json +4 -4
  23. package/node_modules/@earendil-works/pi-ai/README.md +5 -3
  24. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts.map +1 -1
  25. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +34 -19
  26. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js.map +1 -1
  27. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.d.ts +2 -0
  28. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.d.ts.map +1 -1
  29. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +9 -2
  30. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js.map +1 -1
  31. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.d.ts.map +1 -1
  32. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +131 -7
  33. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js.map +1 -1
  34. package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.d.ts +2 -2
  35. package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.d.ts.map +1 -1
  36. package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +17 -13
  37. package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js.map +1 -1
  38. package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.d.ts +5 -2
  39. package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.d.ts.map +1 -1
  40. package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js +16 -0
  41. package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js.map +1 -1
  42. package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.d.ts +2 -2
  43. package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.d.ts.map +1 -1
  44. package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +15 -11
  45. package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js.map +1 -1
  46. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.d.ts.map +1 -1
  47. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +7 -2
  48. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js.map +1 -1
  49. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts.map +1 -1
  50. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +4 -1
  51. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js.map +1 -1
  52. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.d.ts +3 -2
  53. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.d.ts.map +1 -1
  54. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +160 -86
  55. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js.map +1 -1
  56. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.d.ts.map +1 -1
  57. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +6 -2
  58. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js.map +1 -1
  59. package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.d.ts.map +1 -1
  60. package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js +1 -1
  61. package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js.map +1 -1
  62. package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.d.ts +4 -0
  63. package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.d.ts.map +1 -1
  64. package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js +17 -10
  65. package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js.map +1 -1
  66. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/device-code.d.ts +1 -0
  67. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/device-code.d.ts.map +1 -1
  68. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/device-code.js +1 -1
  69. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/device-code.js.map +1 -1
  70. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/github-copilot.d.ts.map +1 -1
  71. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/github-copilot.js +98 -34
  72. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/github-copilot.js.map +1 -1
  73. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/kimi-coding.d.ts.map +1 -1
  74. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/kimi-coding.js +1 -14
  75. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/kimi-coding.js.map +1 -1
  76. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts +75 -0
  77. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts.map +1 -1
  78. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +75 -0
  79. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js.map +1 -1
  80. package/node_modules/@earendil-works/pi-ai/dist/index.d.ts +1 -1
  81. package/node_modules/@earendil-works/pi-ai/dist/index.d.ts.map +1 -1
  82. package/node_modules/@earendil-works/pi-ai/dist/index.js.map +1 -1
  83. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.d.ts +3 -1
  84. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.d.ts.map +1 -1
  85. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.js.map +1 -1
  86. package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  87. package/node_modules/@earendil-works/pi-ai/dist/providers/data/amazon-bedrock.json +1 -1
  88. package/node_modules/@earendil-works/pi-ai/dist/providers/data/anthropic.json +1 -1
  89. package/node_modules/@earendil-works/pi-ai/dist/providers/data/azure-openai-responses.json +1 -1
  90. package/node_modules/@earendil-works/pi-ai/dist/providers/data/baseten.json +1 -1
  91. package/node_modules/@earendil-works/pi-ai/dist/providers/data/cerebras.json +1 -1
  92. package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
  93. package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-workers-ai.json +1 -1
  94. package/node_modules/@earendil-works/pi-ai/dist/providers/data/deepseek.json +1 -1
  95. package/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
  96. package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
  97. package/node_modules/@earendil-works/pi-ai/dist/providers/data/google-vertex.json +1 -1
  98. package/node_modules/@earendil-works/pi-ai/dist/providers/data/google.json +1 -1
  99. package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
  100. package/node_modules/@earendil-works/pi-ai/dist/providers/data/minimax-cn.json +1 -1
  101. package/node_modules/@earendil-works/pi-ai/dist/providers/data/minimax.json +1 -1
  102. package/node_modules/@earendil-works/pi-ai/dist/providers/data/mistral.json +1 -1
  103. package/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.json +1 -1
  104. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai.json +1 -1
  105. package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
  106. package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
  107. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  108. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
  109. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-individual.json +1 -1
  110. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan.json +1 -1
  111. package/node_modules/@earendil-works/pi-ai/dist/providers/data/together.json +1 -1
  112. package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
  113. package/node_modules/@earendil-works/pi-ai/dist/providers/data/xai.json +1 -1
  114. package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-ams.json +1 -1
  115. package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-cn.json +1 -1
  116. package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-sgp.json +1 -1
  117. package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi.json +1 -1
  118. package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai-coding-cn.json +1 -1
  119. package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai.json +1 -1
  120. package/node_modules/@earendil-works/pi-ai/dist/providers/xai.d.ts +1 -1
  121. package/node_modules/@earendil-works/pi-ai/dist/providers/xai.d.ts.map +1 -1
  122. package/node_modules/@earendil-works/pi-ai/dist/providers/xai.js +1 -5
  123. package/node_modules/@earendil-works/pi-ai/dist/providers/xai.js.map +1 -1
  124. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +29 -4
  125. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
  126. package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
  127. package/node_modules/@earendil-works/pi-ai/dist/utils/sleep.d.ts +2 -0
  128. package/node_modules/@earendil-works/pi-ai/dist/utils/sleep.d.ts.map +1 -0
  129. package/node_modules/@earendil-works/pi-ai/dist/utils/sleep.js +15 -0
  130. package/node_modules/@earendil-works/pi-ai/dist/utils/sleep.js.map +1 -0
  131. package/node_modules/@earendil-works/pi-ai/package.json +3 -4
  132. package/node_modules/@earendil-works/pi-client/CHANGELOG.md +4 -0
  133. package/node_modules/@earendil-works/pi-client/package.json +2 -2
  134. package/node_modules/@earendil-works/pi-coding-agent/CHANGELOG.md +127 -0
  135. package/node_modules/@earendil-works/pi-coding-agent/README.md +13 -8
  136. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/anthropic-messages-JWX2WP65.js +45 -0
  137. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/anthropic.js +75 -0
  138. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/azure-openai-responses-5ENVCQ7U.js +2 -0
  139. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/bedrock-converse-stream.js +74 -0
  140. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-2KVJKXS2.js +50 -0
  141. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-4L3WN2XY.js +2 -0
  142. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-6CYCI3EJ.js +12 -0
  143. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-6R7UI4IY.js +2 -0
  144. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-AXIIZGTV.js +2 -0
  145. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-DRQDKNXA.js +2 -0
  146. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-GMWCTUPB.js +2 -0
  147. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-JUUC5AZY.js +2 -0
  148. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-L2ZPNLYD.js +2 -0
  149. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-MNAIPA3J.js +2 -0
  150. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-NBBFIJUL.js +11 -0
  151. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-NUHFSC37.js +25 -0
  152. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-OMWWHBTG.js +1548 -0
  153. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-PGXDEOVV.js +2 -0
  154. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-PJACZCIR.js +2 -0
  155. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-PRRNXB7S.js +2 -0
  156. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-TEPMHNKQ.js +2 -0
  157. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-TRDNDS6A.js +4 -0
  158. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-UAQELI3K.js +2 -0
  159. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-XDUWOHPL.js +6 -0
  160. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-XNGRGP62.js +2 -0
  161. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/github-copilot.js +2 -0
  162. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/google-generative-ai-YMUPJBKR.js +2 -0
  163. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/google-vertex-MPWMV4OF.js +2 -0
  164. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/https-proxy-agent-2VXB7436.js +13 -0
  165. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/image-resize-worker.js +2 -0
  166. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/kimi-coding.js +2 -0
  167. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/lib-HGQMNYVT.js +9 -0
  168. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/mistral-conversations-Q3AWZJAZ.js +5 -0
  169. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/multipart-parser-SQ6GDJL7.js +3 -0
  170. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openai-codex-responses-GJVBJXLB.js +8 -0
  171. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openai-codex.js +75 -0
  172. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openai-completions-ERMU2SS7.js +7 -0
  173. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openai-responses-BSOJMSEV.js +2 -0
  174. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openrouter-images-N4XVVFSD.js +2 -0
  175. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openrouter.js +75 -0
  176. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/pi-messages-TPFH44NP.js +8 -0
  177. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/radius.js +75 -0
  178. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/src-UK77SYZE.js +4 -0
  179. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/xai.js +2 -0
  180. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/cli.js +3 -0
  181. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/client.js +2 -0
  182. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/index.js +2 -0
  183. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/rpc-entry.js +3 -0
  184. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.d.ts +1 -0
  185. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.d.ts.map +1 -1
  186. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js +29 -9
  187. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js.map +1 -1
  188. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/file-processor.d.ts.map +1 -1
  189. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/file-processor.js +2 -1
  190. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/file-processor.js.map +1 -1
  191. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/startup-ui.d.ts.map +1 -1
  192. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/startup-ui.js +2 -1
  193. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/startup-ui.js.map +1 -1
  194. package/node_modules/@earendil-works/pi-coding-agent/dist/config.d.ts +4 -3
  195. package/node_modules/@earendil-works/pi-coding-agent/dist/config.d.ts.map +1 -1
  196. package/node_modules/@earendil-works/pi-coding-agent/dist/config.js +22 -14
  197. package/node_modules/@earendil-works/pi-coding-agent/dist/config.js.map +1 -1
  198. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.d.ts +38 -8
  199. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
  200. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js +240 -104
  201. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js.map +1 -1
  202. package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.d.ts.map +1 -1
  203. package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js +6 -7
  204. package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js.map +1 -1
  205. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  206. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/branch-summarization.js +7 -3
  207. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/branch-summarization.js.map +1 -1
  208. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.d.ts +9 -3
  209. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.d.ts.map +1 -1
  210. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.js +59 -36
  211. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.js.map +1 -1
  212. package/node_modules/@earendil-works/pi-coding-agent/dist/core/defaults.d.ts +1 -0
  213. package/node_modules/@earendil-works/pi-coding-agent/dist/core/defaults.d.ts.map +1 -1
  214. package/node_modules/@earendil-works/pi-coding-agent/dist/core/defaults.js +9 -0
  215. package/node_modules/@earendil-works/pi-coding-agent/dist/core/defaults.js.map +1 -1
  216. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.d.ts +2 -2
  217. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.d.ts.map +1 -1
  218. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.js +1 -1
  219. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.js.map +1 -1
  220. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.d.ts.map +1 -1
  221. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.js +115 -48
  222. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.js.map +1 -1
  223. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.d.ts +5 -0
  224. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.d.ts.map +1 -1
  225. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js +45 -1
  226. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js.map +1 -1
  227. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.d.ts +56 -10
  228. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.d.ts.map +1 -1
  229. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.js +3 -0
  230. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.js.map +1 -1
  231. package/node_modules/@earendil-works/pi-coding-agent/dist/core/footer-data-provider.d.ts +1 -1
  232. package/node_modules/@earendil-works/pi-coding-agent/dist/core/footer-data-provider.d.ts.map +1 -1
  233. package/node_modules/@earendil-works/pi-coding-agent/dist/core/footer-data-provider.js +1 -1
  234. package/node_modules/@earendil-works/pi-coding-agent/dist/core/footer-data-provider.js.map +1 -1
  235. package/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings.d.ts +20 -19
  236. package/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings.d.ts.map +1 -1
  237. package/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings.js +26 -5
  238. package/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings.js.map +1 -1
  239. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-config.d.ts +5 -0
  240. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-config.d.ts.map +1 -1
  241. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-config.js +3 -1
  242. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-config.js.map +1 -1
  243. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.d.ts +1 -0
  244. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.d.ts.map +1 -1
  245. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js +14 -8
  246. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js.map +1 -1
  247. package/node_modules/@earendil-works/pi-coding-agent/dist/core/models-store.d.ts.map +1 -1
  248. package/node_modules/@earendil-works/pi-coding-agent/dist/core/models-store.js +2 -1
  249. package/node_modules/@earendil-works/pi-coding-agent/dist/core/models-store.js.map +1 -1
  250. package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.d.ts.map +1 -1
  251. package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js +22 -14
  252. package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js.map +1 -1
  253. package/node_modules/@earendil-works/pi-coding-agent/dist/core/pi-manifest.d.ts.map +1 -1
  254. package/node_modules/@earendil-works/pi-coding-agent/dist/core/pi-manifest.js +2 -1
  255. package/node_modules/@earendil-works/pi-coding-agent/dist/core/pi-manifest.js.map +1 -1
  256. package/node_modules/@earendil-works/pi-coding-agent/dist/core/remote-catalog-provider.d.ts.map +1 -1
  257. package/node_modules/@earendil-works/pi-coding-agent/dist/core/remote-catalog-provider.js +2 -1
  258. package/node_modules/@earendil-works/pi-coding-agent/dist/core/remote-catalog-provider.js.map +1 -1
  259. package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.d.ts.map +1 -1
  260. package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.js +3 -2
  261. package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.js.map +1 -1
  262. package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.d.ts +2 -2
  263. package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.d.ts.map +1 -1
  264. package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.js +10 -3
  265. package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.js.map +1 -1
  266. package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-export.d.ts +4 -0
  267. package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-export.d.ts.map +1 -0
  268. package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-export.js +32 -0
  269. package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-export.js.map +1 -0
  270. package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.d.ts.map +1 -1
  271. package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.js +6 -3
  272. package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.js.map +1 -1
  273. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-diagnostics.d.ts +9 -0
  274. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-diagnostics.d.ts.map +1 -0
  275. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-diagnostics.js +21 -0
  276. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-diagnostics.js.map +1 -0
  277. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.d.ts +17 -1
  278. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.d.ts.map +1 -1
  279. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js +69 -10
  280. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
  281. package/node_modules/@earendil-works/pi-coding-agent/dist/core/skills.d.ts.map +1 -1
  282. package/node_modules/@earendil-works/pi-coding-agent/dist/core/skills.js +51 -33
  283. package/node_modules/@earendil-works/pi-coding-agent/dist/core/skills.js.map +1 -1
  284. package/node_modules/@earendil-works/pi-coding-agent/dist/core/slash-commands.d.ts.map +1 -1
  285. package/node_modules/@earendil-works/pi-coding-agent/dist/core/slash-commands.js +2 -1
  286. package/node_modules/@earendil-works/pi-coding-agent/dist/core/slash-commands.js.map +1 -1
  287. package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.d.ts.map +1 -1
  288. package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.js +11 -2
  289. package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.js.map +1 -1
  290. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.d.ts +14 -1
  291. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.d.ts.map +1 -1
  292. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js +36 -20
  293. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js.map +1 -1
  294. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit-diff.d.ts +0 -5
  295. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit-diff.d.ts.map +1 -1
  296. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit-diff.js +2 -5
  297. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit-diff.js.map +1 -1
  298. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit.d.ts.map +1 -1
  299. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit.js +20 -4
  300. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit.js.map +1 -1
  301. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/index.d.ts +4 -1
  302. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/index.d.ts.map +1 -1
  303. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/index.js +18 -1
  304. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/index.js.map +1 -1
  305. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/powershell.d.ts +16 -0
  306. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/powershell.d.ts.map +1 -0
  307. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/powershell.js +39 -0
  308. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/powershell.js.map +1 -0
  309. package/node_modules/@earendil-works/pi-coding-agent/dist/core/trust-manager.d.ts.map +1 -1
  310. package/node_modules/@earendil-works/pi-coding-agent/dist/core/trust-manager.js +2 -1
  311. package/node_modules/@earendil-works/pi-coding-agent/dist/core/trust-manager.js.map +1 -1
  312. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/client.d.ts +6 -0
  313. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/client.d.ts.map +1 -1
  314. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/client.js +7 -0
  315. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/client.js.map +1 -1
  316. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/index.d.ts.map +1 -1
  317. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/index.js +2 -0
  318. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/index.js.map +1 -1
  319. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/provider.d.ts +3 -1
  320. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/provider.d.ts.map +1 -1
  321. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/provider.js +29 -4
  322. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/provider.js.map +1 -1
  323. package/node_modules/@earendil-works/pi-coding-agent/dist/index.d.ts +6 -5
  324. package/node_modules/@earendil-works/pi-coding-agent/dist/index.d.ts.map +1 -1
  325. package/node_modules/@earendil-works/pi-coding-agent/dist/index.js +5 -4
  326. package/node_modules/@earendil-works/pi-coding-agent/dist/index.js.map +1 -1
  327. package/node_modules/@earendil-works/pi-coding-agent/dist/main.d.ts +4 -0
  328. package/node_modules/@earendil-works/pi-coding-agent/dist/main.d.ts.map +1 -1
  329. package/node_modules/@earendil-works/pi-coding-agent/dist/main.js +20 -15
  330. package/node_modules/@earendil-works/pi-coding-agent/dist/main.js.map +1 -1
  331. package/node_modules/@earendil-works/pi-coding-agent/dist/migrations.d.ts.map +1 -1
  332. package/node_modules/@earendil-works/pi-coding-agent/dist/migrations.js +4 -3
  333. package/node_modules/@earendil-works/pi-coding-agent/dist/migrations.js.map +1 -1
  334. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/model-selector.d.ts +9 -3
  335. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  336. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/model-selector.js +56 -12
  337. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/model-selector.js.map +1 -1
  338. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts +9 -2
  339. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  340. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +128 -56
  341. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -1
  342. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-submenu.d.ts +72 -0
  343. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -0
  344. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-submenu.js +165 -0
  345. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-submenu.js.map +1 -0
  346. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/thinking-selector.d.ts +15 -3
  347. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
  348. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/thinking-selector.js +74 -17
  349. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/thinking-selector.js.map +1 -1
  350. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/external-editor.d.ts.map +1 -1
  351. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/external-editor.js +2 -1
  352. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/external-editor.js.map +1 -1
  353. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +15 -0
  354. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  355. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js +230 -136
  356. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
  357. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/session-share.d.ts +16 -0
  358. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/session-share.d.ts.map +1 -0
  359. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/session-share.js +188 -0
  360. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/session-share.js.map +1 -0
  361. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  362. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.js +4 -3
  363. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.js.map +1 -1
  364. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/json-event.d.ts +16 -13
  365. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/json-event.d.ts.map +1 -1
  366. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/json-event.js +20 -6
  367. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/json-event.js.map +1 -1
  368. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-client.d.ts +7 -0
  369. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  370. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-client.js +7 -0
  371. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-client.js.map +1 -1
  372. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  373. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js +3 -0
  374. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js.map +1 -1
  375. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-types.d.ts +12 -0
  376. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  377. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-types.js.map +1 -1
  378. package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.d.ts +1 -0
  379. package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.d.ts.map +1 -1
  380. package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js +186 -2
  381. package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js.map +1 -1
  382. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/frontmatter.d.ts.map +1 -1
  383. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/frontmatter.js +2 -1
  384. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/frontmatter.js.map +1 -1
  385. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/management-http.d.ts +5 -3
  386. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/management-http.d.ts.map +1 -1
  387. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/management-http.js +14 -10
  388. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/management-http.js.map +1 -1
  389. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/shell.d.ts +3 -0
  390. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/shell.d.ts.map +1 -1
  391. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/shell.js +23 -9
  392. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/shell.js.map +1 -1
  393. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/syntax-highlight.d.ts +1 -0
  394. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/syntax-highlight.d.ts.map +1 -1
  395. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/syntax-highlight.js +60 -1
  396. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/syntax-highlight.js.map +1 -1
  397. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/text.d.ts +8 -0
  398. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/text.d.ts.map +1 -0
  399. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/text.js +9 -0
  400. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/text.js.map +1 -0
  401. package/node_modules/@earendil-works/pi-coding-agent/docs/compaction.md +17 -0
  402. package/node_modules/@earendil-works/pi-coding-agent/docs/custom-provider.md +12 -9
  403. package/node_modules/@earendil-works/pi-coding-agent/docs/environment-variables.md +11 -8
  404. package/node_modules/@earendil-works/pi-coding-agent/docs/extensions.md +35 -7
  405. package/node_modules/@earendil-works/pi-coding-agent/docs/json.md +7 -2
  406. package/node_modules/@earendil-works/pi-coding-agent/docs/keybindings.md +9 -9
  407. package/node_modules/@earendil-works/pi-coding-agent/docs/llama-cpp.md +2 -0
  408. package/node_modules/@earendil-works/pi-coding-agent/docs/models.md +8 -2
  409. package/node_modules/@earendil-works/pi-coding-agent/docs/packages.md +2 -2
  410. package/node_modules/@earendil-works/pi-coding-agent/docs/quickstart.md +1 -1
  411. package/node_modules/@earendil-works/pi-coding-agent/docs/rpc.md +32 -3
  412. package/node_modules/@earendil-works/pi-coding-agent/docs/sdk.md +7 -2
  413. package/node_modules/@earendil-works/pi-coding-agent/docs/settings.md +23 -7
  414. package/node_modules/@earendil-works/pi-coding-agent/docs/skills.md +4 -3
  415. package/node_modules/@earendil-works/pi-coding-agent/docs/terminal-setup.md +23 -9
  416. package/node_modules/@earendil-works/pi-coding-agent/docs/usage.md +10 -5
  417. package/node_modules/@earendil-works/pi-coding-agent/docs/windows.md +24 -2
  418. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/border-status-editor.ts +1 -1
  419. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  420. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/package.json +1 -1
  421. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  422. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/git-checkpoint.ts +2 -2
  423. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/package-lock.json +2 -2
  424. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/package.json +1 -1
  425. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/notify.ts +3 -1
  426. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/sandbox/package-lock.json +2 -2
  427. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/sandbox/package.json +1 -1
  428. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/subagent/README.md +1 -1
  429. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/subagent/index.ts +6 -1
  430. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/titlebar-spinner.ts +1 -1
  431. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package-lock.json +2 -2
  432. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package.json +1 -1
  433. package/node_modules/@earendil-works/pi-coding-agent/examples/rpc-extension-ui.ts +1 -1
  434. package/node_modules/@earendil-works/pi-coding-agent/examples/sdk/06-extensions.ts +1 -1
  435. package/node_modules/@earendil-works/pi-coding-agent/examples/sdk/README.md +1 -1
  436. package/node_modules/@earendil-works/pi-coding-agent/package.json +12 -14
  437. package/node_modules/@earendil-works/pi-protocol/package.json +1 -1
  438. package/node_modules/@earendil-works/pi-telemetry/package.json +2 -2
  439. package/node_modules/@earendil-works/pi-tui/README.md +1 -1
  440. package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts +1 -0
  441. package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts.map +1 -1
  442. package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js +36 -3
  443. package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js.map +1 -1
  444. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts.map +1 -1
  445. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +9 -4
  446. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js.map +1 -1
  447. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts +8 -2
  448. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts.map +1 -1
  449. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +24 -4
  450. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js.map +1 -1
  451. package/node_modules/@earendil-works/pi-tui/dist/components/text.d.ts.map +1 -1
  452. package/node_modules/@earendil-works/pi-tui/dist/components/text.js +5 -4
  453. package/node_modules/@earendil-works/pi-tui/dist/components/text.js.map +1 -1
  454. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +1 -1
  455. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
  456. package/node_modules/@earendil-works/pi-tui/dist/index.js +1 -1
  457. package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
  458. package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts +2 -2
  459. package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts.map +1 -1
  460. package/node_modules/@earendil-works/pi-tui/dist/keybindings.js +2 -2
  461. package/node_modules/@earendil-works/pi-tui/dist/keybindings.js.map +1 -1
  462. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts.map +1 -1
  463. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js +2 -8
  464. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js.map +1 -1
  465. package/node_modules/@earendil-works/pi-tui/dist/native-module-path.d.ts +7 -0
  466. package/node_modules/@earendil-works/pi-tui/dist/native-module-path.d.ts.map +1 -0
  467. package/node_modules/@earendil-works/pi-tui/dist/native-module-path.js +19 -0
  468. package/node_modules/@earendil-works/pi-tui/dist/native-module-path.js.map +1 -0
  469. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts +2 -0
  470. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts.map +1 -1
  471. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +37 -2
  472. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +1 -1
  473. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
  474. package/node_modules/@earendil-works/pi-tui/dist/terminal.js +4 -10
  475. package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
  476. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts +11 -0
  477. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts.map +1 -1
  478. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js +63 -16
  479. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js.map +1 -1
  480. package/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.d.ts.map +1 -1
  481. package/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.js +105 -45
  482. package/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.js.map +1 -1
  483. package/node_modules/@earendil-works/pi-tui/package.json +1 -1
  484. package/node_modules/@types/node/README.md +1 -1
  485. package/node_modules/@types/node/buffer.buffer.d.ts +10 -5
  486. package/node_modules/@types/node/crypto.d.ts +2 -4
  487. package/node_modules/@types/node/dgram.d.ts +119 -4
  488. package/node_modules/@types/node/fs/promises.d.ts +61 -65
  489. package/node_modules/@types/node/fs.d.ts +86 -76
  490. package/node_modules/@types/node/http.d.ts +17 -1
  491. package/node_modules/@types/node/http2.d.ts +12 -4
  492. package/node_modules/@types/node/index.d.ts +1 -0
  493. package/node_modules/@types/node/inspector.d.ts +2 -1
  494. package/node_modules/@types/node/net.d.ts +108 -16
  495. package/node_modules/@types/node/package.json +2 -2
  496. package/node_modules/@types/node/process.d.ts +52 -0
  497. package/node_modules/@types/node/quic.d.ts +246 -38
  498. package/node_modules/@types/node/sqlite.d.ts +6 -2
  499. package/node_modules/@types/node/stream/iter.d.ts +4 -4
  500. package/node_modules/@types/node/test.d.ts +36 -0
  501. package/node_modules/@types/node/tls.d.ts +24 -0
  502. package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +5 -0
  503. package/node_modules/@types/node/ts5.6/index.d.ts +1 -0
  504. package/node_modules/@types/node/ts5.7/index.d.ts +1 -0
  505. package/node_modules/@types/node/tty.d.ts +4 -3
  506. package/node_modules/@types/node/vfs.d.ts +210 -0
  507. package/node_modules/@types/node/vm.d.ts +1 -1
  508. package/node_modules/brace-expansion/README.md +1 -2
  509. package/node_modules/brace-expansion/dist/commonjs/index.js +30 -4
  510. package/node_modules/brace-expansion/dist/commonjs/index.js.map +1 -1
  511. package/node_modules/brace-expansion/dist/esm/index.js +30 -4
  512. package/node_modules/brace-expansion/dist/esm/index.js.map +1 -1
  513. package/node_modules/brace-expansion/package.json +1 -1
  514. package/package.json +9 -9
  515. package/src/prism-extensions/integrations/ai-memory-system.ts +14 -9
  516. package/node_modules/@opentelemetry/api/LICENSE +0 -201
  517. package/node_modules/@opentelemetry/api/README.md +0 -116
  518. package/node_modules/@opentelemetry/api/build/esm/api/context.d.ts +0 -41
  519. package/node_modules/@opentelemetry/api/build/esm/api/context.js +0 -110
  520. package/node_modules/@opentelemetry/api/build/esm/api/context.js.map +0 -1
  521. package/node_modules/@opentelemetry/api/build/esm/api/diag.d.ts +0 -30
  522. package/node_modules/@opentelemetry/api/build/esm/api/diag.js +0 -121
  523. package/node_modules/@opentelemetry/api/build/esm/api/diag.js.map +0 -1
  524. package/node_modules/@opentelemetry/api/build/esm/api/metrics.d.ts +0 -28
  525. package/node_modules/@opentelemetry/api/build/esm/api/metrics.js +0 -60
  526. package/node_modules/@opentelemetry/api/build/esm/api/metrics.js.map +0 -1
  527. package/node_modules/@opentelemetry/api/build/esm/api/propagation.d.ts +0 -49
  528. package/node_modules/@opentelemetry/api/build/esm/api/propagation.js +0 -89
  529. package/node_modules/@opentelemetry/api/build/esm/api/propagation.js.map +0 -1
  530. package/node_modules/@opentelemetry/api/build/esm/api/trace.d.ts +0 -40
  531. package/node_modules/@opentelemetry/api/build/esm/api/trace.js +0 -77
  532. package/node_modules/@opentelemetry/api/build/esm/api/trace.js.map +0 -1
  533. package/node_modules/@opentelemetry/api/build/esm/baggage/context-helpers.d.ts +0 -29
  534. package/node_modules/@opentelemetry/api/build/esm/baggage/context-helpers.js +0 -56
  535. package/node_modules/@opentelemetry/api/build/esm/baggage/context-helpers.js.map +0 -1
  536. package/node_modules/@opentelemetry/api/build/esm/baggage/internal/baggage-impl.d.ts +0 -12
  537. package/node_modules/@opentelemetry/api/build/esm/baggage/internal/baggage-impl.js +0 -98
  538. package/node_modules/@opentelemetry/api/build/esm/baggage/internal/baggage-impl.js.map +0 -1
  539. package/node_modules/@opentelemetry/api/build/esm/baggage/internal/symbol.d.ts +0 -5
  540. package/node_modules/@opentelemetry/api/build/esm/baggage/internal/symbol.js +0 -20
  541. package/node_modules/@opentelemetry/api/build/esm/baggage/internal/symbol.js.map +0 -1
  542. package/node_modules/@opentelemetry/api/build/esm/baggage/types.d.ts +0 -60
  543. package/node_modules/@opentelemetry/api/build/esm/baggage/types.js +0 -17
  544. package/node_modules/@opentelemetry/api/build/esm/baggage/types.js.map +0 -1
  545. package/node_modules/@opentelemetry/api/build/esm/baggage/utils.d.ts +0 -15
  546. package/node_modules/@opentelemetry/api/build/esm/baggage/utils.js +0 -47
  547. package/node_modules/@opentelemetry/api/build/esm/baggage/utils.js.map +0 -1
  548. package/node_modules/@opentelemetry/api/build/esm/common/Attributes.d.ts +0 -15
  549. package/node_modules/@opentelemetry/api/build/esm/common/Attributes.js +0 -17
  550. package/node_modules/@opentelemetry/api/build/esm/common/Attributes.js.map +0 -1
  551. package/node_modules/@opentelemetry/api/build/esm/common/Exception.d.ts +0 -26
  552. package/node_modules/@opentelemetry/api/build/esm/common/Exception.js +0 -17
  553. package/node_modules/@opentelemetry/api/build/esm/common/Exception.js.map +0 -1
  554. package/node_modules/@opentelemetry/api/build/esm/common/Time.d.ts +0 -20
  555. package/node_modules/@opentelemetry/api/build/esm/common/Time.js +0 -2
  556. package/node_modules/@opentelemetry/api/build/esm/common/Time.js.map +0 -1
  557. package/node_modules/@opentelemetry/api/build/esm/context/NoopContextManager.d.ts +0 -9
  558. package/node_modules/@opentelemetry/api/build/esm/context/NoopContextManager.js +0 -67
  559. package/node_modules/@opentelemetry/api/build/esm/context/NoopContextManager.js.map +0 -1
  560. package/node_modules/@opentelemetry/api/build/esm/context/context.d.ts +0 -6
  561. package/node_modules/@opentelemetry/api/build/esm/context/context.js +0 -52
  562. package/node_modules/@opentelemetry/api/build/esm/context/context.js.map +0 -1
  563. package/node_modules/@opentelemetry/api/build/esm/context/types.d.ts +0 -52
  564. package/node_modules/@opentelemetry/api/build/esm/context/types.js +0 -17
  565. package/node_modules/@opentelemetry/api/build/esm/context/types.js.map +0 -1
  566. package/node_modules/@opentelemetry/api/build/esm/context-api.d.ts +0 -4
  567. package/node_modules/@opentelemetry/api/build/esm/context-api.js +0 -21
  568. package/node_modules/@opentelemetry/api/build/esm/context-api.js.map +0 -1
  569. package/node_modules/@opentelemetry/api/build/esm/diag/ComponentLogger.d.ts +0 -20
  570. package/node_modules/@opentelemetry/api/build/esm/diag/ComponentLogger.js +0 -102
  571. package/node_modules/@opentelemetry/api/build/esm/diag/ComponentLogger.js.map +0 -1
  572. package/node_modules/@opentelemetry/api/build/esm/diag/consoleLogger.d.ts +0 -38
  573. package/node_modules/@opentelemetry/api/build/esm/diag/consoleLogger.js +0 -59
  574. package/node_modules/@opentelemetry/api/build/esm/diag/consoleLogger.js.map +0 -1
  575. package/node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.d.ts +0 -3
  576. package/node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.js +0 -41
  577. package/node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.js.map +0 -1
  578. package/node_modules/@opentelemetry/api/build/esm/diag/internal/noopLogger.d.ts +0 -8
  579. package/node_modules/@opentelemetry/api/build/esm/diag/internal/noopLogger.js +0 -31
  580. package/node_modules/@opentelemetry/api/build/esm/diag/internal/noopLogger.js.map +0 -1
  581. package/node_modules/@opentelemetry/api/build/esm/diag/types.d.ts +0 -100
  582. package/node_modules/@opentelemetry/api/build/esm/diag/types.js +0 -41
  583. package/node_modules/@opentelemetry/api/build/esm/diag/types.js.map +0 -1
  584. package/node_modules/@opentelemetry/api/build/esm/diag-api.d.ts +0 -9
  585. package/node_modules/@opentelemetry/api/build/esm/diag-api.js +0 -26
  586. package/node_modules/@opentelemetry/api/build/esm/diag-api.js.map +0 -1
  587. package/node_modules/@opentelemetry/api/build/esm/experimental/index.d.ts +0 -3
  588. package/node_modules/@opentelemetry/api/build/esm/experimental/index.js +0 -17
  589. package/node_modules/@opentelemetry/api/build/esm/experimental/index.js.map +0 -1
  590. package/node_modules/@opentelemetry/api/build/esm/experimental/trace/SugaredOptions.d.ts +0 -13
  591. package/node_modules/@opentelemetry/api/build/esm/experimental/trace/SugaredOptions.js +0 -17
  592. package/node_modules/@opentelemetry/api/build/esm/experimental/trace/SugaredOptions.js.map +0 -1
  593. package/node_modules/@opentelemetry/api/build/esm/experimental/trace/SugaredTracer.d.ts +0 -64
  594. package/node_modules/@opentelemetry/api/build/esm/experimental/trace/SugaredTracer.js +0 -92
  595. package/node_modules/@opentelemetry/api/build/esm/experimental/trace/SugaredTracer.js.map +0 -1
  596. package/node_modules/@opentelemetry/api/build/esm/index.d.ts +0 -54
  597. package/node_modules/@opentelemetry/api/build/esm/index.js +0 -53
  598. package/node_modules/@opentelemetry/api/build/esm/index.js.map +0 -1
  599. package/node_modules/@opentelemetry/api/build/esm/internal/global-utils.d.ts +0 -18
  600. package/node_modules/@opentelemetry/api/build/esm/internal/global-utils.js +0 -59
  601. package/node_modules/@opentelemetry/api/build/esm/internal/global-utils.js.map +0 -1
  602. package/node_modules/@opentelemetry/api/build/esm/internal/semver.d.ts +0 -34
  603. package/node_modules/@opentelemetry/api/build/esm/internal/semver.js +0 -118
  604. package/node_modules/@opentelemetry/api/build/esm/internal/semver.js.map +0 -1
  605. package/node_modules/@opentelemetry/api/build/esm/metrics/Meter.d.ts +0 -110
  606. package/node_modules/@opentelemetry/api/build/esm/metrics/Meter.js +0 -17
  607. package/node_modules/@opentelemetry/api/build/esm/metrics/Meter.js.map +0 -1
  608. package/node_modules/@opentelemetry/api/build/esm/metrics/MeterProvider.d.ts +0 -17
  609. package/node_modules/@opentelemetry/api/build/esm/metrics/MeterProvider.js +0 -17
  610. package/node_modules/@opentelemetry/api/build/esm/metrics/MeterProvider.js.map +0 -1
  611. package/node_modules/@opentelemetry/api/build/esm/metrics/Metric.d.ts +0 -115
  612. package/node_modules/@opentelemetry/api/build/esm/metrics/Metric.js +0 -22
  613. package/node_modules/@opentelemetry/api/build/esm/metrics/Metric.js.map +0 -1
  614. package/node_modules/@opentelemetry/api/build/esm/metrics/NoopMeter.d.ts +0 -82
  615. package/node_modules/@opentelemetry/api/build/esm/metrics/NoopMeter.js +0 -181
  616. package/node_modules/@opentelemetry/api/build/esm/metrics/NoopMeter.js.map +0 -1
  617. package/node_modules/@opentelemetry/api/build/esm/metrics/NoopMeterProvider.d.ts +0 -11
  618. package/node_modules/@opentelemetry/api/build/esm/metrics/NoopMeterProvider.js +0 -31
  619. package/node_modules/@opentelemetry/api/build/esm/metrics/NoopMeterProvider.js.map +0 -1
  620. package/node_modules/@opentelemetry/api/build/esm/metrics/ObservableResult.d.ts +0 -31
  621. package/node_modules/@opentelemetry/api/build/esm/metrics/ObservableResult.js +0 -17
  622. package/node_modules/@opentelemetry/api/build/esm/metrics/ObservableResult.js.map +0 -1
  623. package/node_modules/@opentelemetry/api/build/esm/metrics-api.d.ts +0 -4
  624. package/node_modules/@opentelemetry/api/build/esm/metrics-api.js +0 -21
  625. package/node_modules/@opentelemetry/api/build/esm/metrics-api.js.map +0 -1
  626. package/node_modules/@opentelemetry/api/build/esm/platform/browser/globalThis.d.ts +0 -10
  627. package/node_modules/@opentelemetry/api/build/esm/platform/browser/globalThis.js +0 -35
  628. package/node_modules/@opentelemetry/api/build/esm/platform/browser/globalThis.js.map +0 -1
  629. package/node_modules/@opentelemetry/api/build/esm/platform/browser/index.d.ts +0 -2
  630. package/node_modules/@opentelemetry/api/build/esm/platform/browser/index.js +0 -17
  631. package/node_modules/@opentelemetry/api/build/esm/platform/browser/index.js.map +0 -1
  632. package/node_modules/@opentelemetry/api/build/esm/platform/index.d.ts +0 -2
  633. package/node_modules/@opentelemetry/api/build/esm/platform/index.js +0 -17
  634. package/node_modules/@opentelemetry/api/build/esm/platform/index.js.map +0 -1
  635. package/node_modules/@opentelemetry/api/build/esm/platform/node/globalThis.d.ts +0 -3
  636. package/node_modules/@opentelemetry/api/build/esm/platform/node/globalThis.js +0 -19
  637. package/node_modules/@opentelemetry/api/build/esm/platform/node/globalThis.js.map +0 -1
  638. package/node_modules/@opentelemetry/api/build/esm/platform/node/index.d.ts +0 -2
  639. package/node_modules/@opentelemetry/api/build/esm/platform/node/index.js +0 -17
  640. package/node_modules/@opentelemetry/api/build/esm/platform/node/index.js.map +0 -1
  641. package/node_modules/@opentelemetry/api/build/esm/propagation/NoopTextMapPropagator.d.ts +0 -13
  642. package/node_modules/@opentelemetry/api/build/esm/propagation/NoopTextMapPropagator.js +0 -34
  643. package/node_modules/@opentelemetry/api/build/esm/propagation/NoopTextMapPropagator.js.map +0 -1
  644. package/node_modules/@opentelemetry/api/build/esm/propagation/TextMapPropagator.d.ts +0 -84
  645. package/node_modules/@opentelemetry/api/build/esm/propagation/TextMapPropagator.js +0 -38
  646. package/node_modules/@opentelemetry/api/build/esm/propagation/TextMapPropagator.js.map +0 -1
  647. package/node_modules/@opentelemetry/api/build/esm/propagation-api.d.ts +0 -4
  648. package/node_modules/@opentelemetry/api/build/esm/propagation-api.js +0 -21
  649. package/node_modules/@opentelemetry/api/build/esm/propagation-api.js.map +0 -1
  650. package/node_modules/@opentelemetry/api/build/esm/trace/NonRecordingSpan.d.ts +0 -28
  651. package/node_modules/@opentelemetry/api/build/esm/trace/NonRecordingSpan.js +0 -68
  652. package/node_modules/@opentelemetry/api/build/esm/trace/NonRecordingSpan.js.map +0 -1
  653. package/node_modules/@opentelemetry/api/build/esm/trace/NoopTracer.d.ts +0 -14
  654. package/node_modules/@opentelemetry/api/build/esm/trace/NoopTracer.js +0 -76
  655. package/node_modules/@opentelemetry/api/build/esm/trace/NoopTracer.js.map +0 -1
  656. package/node_modules/@opentelemetry/api/build/esm/trace/NoopTracerProvider.d.ts +0 -13
  657. package/node_modules/@opentelemetry/api/build/esm/trace/NoopTracerProvider.js +0 -32
  658. package/node_modules/@opentelemetry/api/build/esm/trace/NoopTracerProvider.js.map +0 -1
  659. package/node_modules/@opentelemetry/api/build/esm/trace/ProxyTracer.d.ts +0 -27
  660. package/node_modules/@opentelemetry/api/build/esm/trace/ProxyTracer.js +0 -53
  661. package/node_modules/@opentelemetry/api/build/esm/trace/ProxyTracer.js.map +0 -1
  662. package/node_modules/@opentelemetry/api/build/esm/trace/ProxyTracerProvider.d.ts +0 -25
  663. package/node_modules/@opentelemetry/api/build/esm/trace/ProxyTracerProvider.js +0 -54
  664. package/node_modules/@opentelemetry/api/build/esm/trace/ProxyTracerProvider.js.map +0 -1
  665. package/node_modules/@opentelemetry/api/build/esm/trace/Sampler.d.ts +0 -31
  666. package/node_modules/@opentelemetry/api/build/esm/trace/Sampler.js +0 -17
  667. package/node_modules/@opentelemetry/api/build/esm/trace/Sampler.js.map +0 -1
  668. package/node_modules/@opentelemetry/api/build/esm/trace/SamplingResult.d.ts +0 -49
  669. package/node_modules/@opentelemetry/api/build/esm/trace/SamplingResult.js +0 -39
  670. package/node_modules/@opentelemetry/api/build/esm/trace/SamplingResult.js.map +0 -1
  671. package/node_modules/@opentelemetry/api/build/esm/trace/SpanOptions.d.ts +0 -23
  672. package/node_modules/@opentelemetry/api/build/esm/trace/SpanOptions.js +0 -17
  673. package/node_modules/@opentelemetry/api/build/esm/trace/SpanOptions.js.map +0 -1
  674. package/node_modules/@opentelemetry/api/build/esm/trace/attributes.d.ts +0 -10
  675. package/node_modules/@opentelemetry/api/build/esm/trace/attributes.js +0 -17
  676. package/node_modules/@opentelemetry/api/build/esm/trace/attributes.js.map +0 -1
  677. package/node_modules/@opentelemetry/api/build/esm/trace/context-utils.d.ts +0 -41
  678. package/node_modules/@opentelemetry/api/build/esm/trace/context-utils.js +0 -73
  679. package/node_modules/@opentelemetry/api/build/esm/trace/context-utils.js.map +0 -1
  680. package/node_modules/@opentelemetry/api/build/esm/trace/internal/tracestate-impl.d.ts +0 -22
  681. package/node_modules/@opentelemetry/api/build/esm/trace/internal/tracestate-impl.js +0 -102
  682. package/node_modules/@opentelemetry/api/build/esm/trace/internal/tracestate-impl.js.map +0 -1
  683. package/node_modules/@opentelemetry/api/build/esm/trace/internal/tracestate-validators.d.ts +0 -15
  684. package/node_modules/@opentelemetry/api/build/esm/trace/internal/tracestate-validators.js +0 -41
  685. package/node_modules/@opentelemetry/api/build/esm/trace/internal/tracestate-validators.js.map +0 -1
  686. package/node_modules/@opentelemetry/api/build/esm/trace/internal/utils.d.ts +0 -3
  687. package/node_modules/@opentelemetry/api/build/esm/trace/internal/utils.js +0 -20
  688. package/node_modules/@opentelemetry/api/build/esm/trace/internal/utils.js.map +0 -1
  689. package/node_modules/@opentelemetry/api/build/esm/trace/invalid-span-constants.d.ts +0 -5
  690. package/node_modules/@opentelemetry/api/build/esm/trace/invalid-span-constants.js +0 -24
  691. package/node_modules/@opentelemetry/api/build/esm/trace/invalid-span-constants.js.map +0 -1
  692. package/node_modules/@opentelemetry/api/build/esm/trace/link.d.ts +0 -26
  693. package/node_modules/@opentelemetry/api/build/esm/trace/link.js +0 -17
  694. package/node_modules/@opentelemetry/api/build/esm/trace/link.js.map +0 -1
  695. package/node_modules/@opentelemetry/api/build/esm/trace/span.d.ts +0 -120
  696. package/node_modules/@opentelemetry/api/build/esm/trace/span.js +0 -17
  697. package/node_modules/@opentelemetry/api/build/esm/trace/span.js.map +0 -1
  698. package/node_modules/@opentelemetry/api/build/esm/trace/span_context.d.ts +0 -53
  699. package/node_modules/@opentelemetry/api/build/esm/trace/span_context.js +0 -17
  700. package/node_modules/@opentelemetry/api/build/esm/trace/span_context.js.map +0 -1
  701. package/node_modules/@opentelemetry/api/build/esm/trace/span_kind.d.ts +0 -27
  702. package/node_modules/@opentelemetry/api/build/esm/trace/span_kind.js +0 -43
  703. package/node_modules/@opentelemetry/api/build/esm/trace/span_kind.js.map +0 -1
  704. package/node_modules/@opentelemetry/api/build/esm/trace/spancontext-utils.d.ts +0 -17
  705. package/node_modules/@opentelemetry/api/build/esm/trace/spancontext-utils.js +0 -42
  706. package/node_modules/@opentelemetry/api/build/esm/trace/spancontext-utils.js.map +0 -1
  707. package/node_modules/@opentelemetry/api/build/esm/trace/status.d.ts +0 -25
  708. package/node_modules/@opentelemetry/api/build/esm/trace/status.js +0 -20
  709. package/node_modules/@opentelemetry/api/build/esm/trace/status.js.map +0 -1
  710. package/node_modules/@opentelemetry/api/build/esm/trace/trace_flags.d.ts +0 -7
  711. package/node_modules/@opentelemetry/api/build/esm/trace/trace_flags.js +0 -23
  712. package/node_modules/@opentelemetry/api/build/esm/trace/trace_flags.js.map +0 -1
  713. package/node_modules/@opentelemetry/api/build/esm/trace/trace_state.d.ts +0 -38
  714. package/node_modules/@opentelemetry/api/build/esm/trace/trace_state.js +0 -17
  715. package/node_modules/@opentelemetry/api/build/esm/trace/trace_state.js.map +0 -1
  716. package/node_modules/@opentelemetry/api/build/esm/trace/tracer.d.ts +0 -71
  717. package/node_modules/@opentelemetry/api/build/esm/trace/tracer.js +0 -17
  718. package/node_modules/@opentelemetry/api/build/esm/trace/tracer.js.map +0 -1
  719. package/node_modules/@opentelemetry/api/build/esm/trace/tracer_options.d.ts +0 -10
  720. package/node_modules/@opentelemetry/api/build/esm/trace/tracer_options.js +0 -17
  721. package/node_modules/@opentelemetry/api/build/esm/trace/tracer_options.js.map +0 -1
  722. package/node_modules/@opentelemetry/api/build/esm/trace/tracer_provider.d.ts +0 -21
  723. package/node_modules/@opentelemetry/api/build/esm/trace/tracer_provider.js +0 -17
  724. package/node_modules/@opentelemetry/api/build/esm/trace/tracer_provider.js.map +0 -1
  725. package/node_modules/@opentelemetry/api/build/esm/trace-api.d.ts +0 -4
  726. package/node_modules/@opentelemetry/api/build/esm/trace-api.js +0 -21
  727. package/node_modules/@opentelemetry/api/build/esm/trace-api.js.map +0 -1
  728. package/node_modules/@opentelemetry/api/build/esm/version.d.ts +0 -2
  729. package/node_modules/@opentelemetry/api/build/esm/version.js +0 -18
  730. package/node_modules/@opentelemetry/api/build/esm/version.js.map +0 -1
  731. package/node_modules/@opentelemetry/api/build/esnext/api/context.d.ts +0 -41
  732. package/node_modules/@opentelemetry/api/build/esnext/api/context.js +0 -77
  733. package/node_modules/@opentelemetry/api/build/esnext/api/context.js.map +0 -1
  734. package/node_modules/@opentelemetry/api/build/esnext/api/diag.d.ts +0 -30
  735. package/node_modules/@opentelemetry/api/build/esnext/api/diag.js +0 -89
  736. package/node_modules/@opentelemetry/api/build/esnext/api/diag.js.map +0 -1
  737. package/node_modules/@opentelemetry/api/build/esnext/api/metrics.d.ts +0 -28
  738. package/node_modules/@opentelemetry/api/build/esnext/api/metrics.js +0 -57
  739. package/node_modules/@opentelemetry/api/build/esnext/api/metrics.js.map +0 -1
  740. package/node_modules/@opentelemetry/api/build/esnext/api/propagation.d.ts +0 -49
  741. package/node_modules/@opentelemetry/api/build/esnext/api/propagation.js +0 -85
  742. package/node_modules/@opentelemetry/api/build/esnext/api/propagation.js.map +0 -1
  743. package/node_modules/@opentelemetry/api/build/esnext/api/trace.d.ts +0 -40
  744. package/node_modules/@opentelemetry/api/build/esnext/api/trace.js +0 -75
  745. package/node_modules/@opentelemetry/api/build/esnext/api/trace.js.map +0 -1
  746. package/node_modules/@opentelemetry/api/build/esnext/baggage/context-helpers.d.ts +0 -29
  747. package/node_modules/@opentelemetry/api/build/esnext/baggage/context-helpers.js +0 -56
  748. package/node_modules/@opentelemetry/api/build/esnext/baggage/context-helpers.js.map +0 -1
  749. package/node_modules/@opentelemetry/api/build/esnext/baggage/internal/baggage-impl.d.ts +0 -12
  750. package/node_modules/@opentelemetry/api/build/esnext/baggage/internal/baggage-impl.js +0 -51
  751. package/node_modules/@opentelemetry/api/build/esnext/baggage/internal/baggage-impl.js.map +0 -1
  752. package/node_modules/@opentelemetry/api/build/esnext/baggage/internal/symbol.d.ts +0 -5
  753. package/node_modules/@opentelemetry/api/build/esnext/baggage/internal/symbol.js +0 -20
  754. package/node_modules/@opentelemetry/api/build/esnext/baggage/internal/symbol.js.map +0 -1
  755. package/node_modules/@opentelemetry/api/build/esnext/baggage/types.d.ts +0 -60
  756. package/node_modules/@opentelemetry/api/build/esnext/baggage/types.js +0 -17
  757. package/node_modules/@opentelemetry/api/build/esnext/baggage/types.js.map +0 -1
  758. package/node_modules/@opentelemetry/api/build/esnext/baggage/utils.d.ts +0 -15
  759. package/node_modules/@opentelemetry/api/build/esnext/baggage/utils.js +0 -46
  760. package/node_modules/@opentelemetry/api/build/esnext/baggage/utils.js.map +0 -1
  761. package/node_modules/@opentelemetry/api/build/esnext/common/Attributes.d.ts +0 -15
  762. package/node_modules/@opentelemetry/api/build/esnext/common/Attributes.js +0 -17
  763. package/node_modules/@opentelemetry/api/build/esnext/common/Attributes.js.map +0 -1
  764. package/node_modules/@opentelemetry/api/build/esnext/common/Exception.d.ts +0 -26
  765. package/node_modules/@opentelemetry/api/build/esnext/common/Exception.js +0 -17
  766. package/node_modules/@opentelemetry/api/build/esnext/common/Exception.js.map +0 -1
  767. package/node_modules/@opentelemetry/api/build/esnext/common/Time.d.ts +0 -20
  768. package/node_modules/@opentelemetry/api/build/esnext/common/Time.js +0 -2
  769. package/node_modules/@opentelemetry/api/build/esnext/common/Time.js.map +0 -1
  770. package/node_modules/@opentelemetry/api/build/esnext/context/NoopContextManager.d.ts +0 -9
  771. package/node_modules/@opentelemetry/api/build/esnext/context/NoopContextManager.js +0 -34
  772. package/node_modules/@opentelemetry/api/build/esnext/context/NoopContextManager.js.map +0 -1
  773. package/node_modules/@opentelemetry/api/build/esnext/context/context.d.ts +0 -6
  774. package/node_modules/@opentelemetry/api/build/esnext/context/context.js +0 -51
  775. package/node_modules/@opentelemetry/api/build/esnext/context/context.js.map +0 -1
  776. package/node_modules/@opentelemetry/api/build/esnext/context/types.d.ts +0 -52
  777. package/node_modules/@opentelemetry/api/build/esnext/context/types.js +0 -17
  778. package/node_modules/@opentelemetry/api/build/esnext/context/types.js.map +0 -1
  779. package/node_modules/@opentelemetry/api/build/esnext/context-api.d.ts +0 -4
  780. package/node_modules/@opentelemetry/api/build/esnext/context-api.js +0 -21
  781. package/node_modules/@opentelemetry/api/build/esnext/context-api.js.map +0 -1
  782. package/node_modules/@opentelemetry/api/build/esnext/diag/ComponentLogger.d.ts +0 -20
  783. package/node_modules/@opentelemetry/api/build/esnext/diag/ComponentLogger.js +0 -55
  784. package/node_modules/@opentelemetry/api/build/esnext/diag/ComponentLogger.js.map +0 -1
  785. package/node_modules/@opentelemetry/api/build/esnext/diag/consoleLogger.d.ts +0 -38
  786. package/node_modules/@opentelemetry/api/build/esnext/diag/consoleLogger.js +0 -53
  787. package/node_modules/@opentelemetry/api/build/esnext/diag/consoleLogger.js.map +0 -1
  788. package/node_modules/@opentelemetry/api/build/esnext/diag/internal/logLevelLogger.d.ts +0 -3
  789. package/node_modules/@opentelemetry/api/build/esnext/diag/internal/logLevelLogger.js +0 -41
  790. package/node_modules/@opentelemetry/api/build/esnext/diag/internal/logLevelLogger.js.map +0 -1
  791. package/node_modules/@opentelemetry/api/build/esnext/diag/internal/noopLogger.d.ts +0 -8
  792. package/node_modules/@opentelemetry/api/build/esnext/diag/internal/noopLogger.js +0 -31
  793. package/node_modules/@opentelemetry/api/build/esnext/diag/internal/noopLogger.js.map +0 -1
  794. package/node_modules/@opentelemetry/api/build/esnext/diag/types.d.ts +0 -100
  795. package/node_modules/@opentelemetry/api/build/esnext/diag/types.js +0 -41
  796. package/node_modules/@opentelemetry/api/build/esnext/diag/types.js.map +0 -1
  797. package/node_modules/@opentelemetry/api/build/esnext/diag-api.d.ts +0 -9
  798. package/node_modules/@opentelemetry/api/build/esnext/diag-api.js +0 -26
  799. package/node_modules/@opentelemetry/api/build/esnext/diag-api.js.map +0 -1
  800. package/node_modules/@opentelemetry/api/build/esnext/experimental/index.d.ts +0 -3
  801. package/node_modules/@opentelemetry/api/build/esnext/experimental/index.js +0 -17
  802. package/node_modules/@opentelemetry/api/build/esnext/experimental/index.js.map +0 -1
  803. package/node_modules/@opentelemetry/api/build/esnext/experimental/trace/SugaredOptions.d.ts +0 -13
  804. package/node_modules/@opentelemetry/api/build/esnext/experimental/trace/SugaredOptions.js +0 -17
  805. package/node_modules/@opentelemetry/api/build/esnext/experimental/trace/SugaredOptions.js.map +0 -1
  806. package/node_modules/@opentelemetry/api/build/esnext/experimental/trace/SugaredTracer.d.ts +0 -64
  807. package/node_modules/@opentelemetry/api/build/esnext/experimental/trace/SugaredTracer.js +0 -88
  808. package/node_modules/@opentelemetry/api/build/esnext/experimental/trace/SugaredTracer.js.map +0 -1
  809. package/node_modules/@opentelemetry/api/build/esnext/index.d.ts +0 -54
  810. package/node_modules/@opentelemetry/api/build/esnext/index.js +0 -53
  811. package/node_modules/@opentelemetry/api/build/esnext/index.js.map +0 -1
  812. package/node_modules/@opentelemetry/api/build/esnext/internal/global-utils.d.ts +0 -18
  813. package/node_modules/@opentelemetry/api/build/esnext/internal/global-utils.js +0 -58
  814. package/node_modules/@opentelemetry/api/build/esnext/internal/global-utils.js.map +0 -1
  815. package/node_modules/@opentelemetry/api/build/esnext/internal/semver.d.ts +0 -34
  816. package/node_modules/@opentelemetry/api/build/esnext/internal/semver.js +0 -118
  817. package/node_modules/@opentelemetry/api/build/esnext/internal/semver.js.map +0 -1
  818. package/node_modules/@opentelemetry/api/build/esnext/metrics/Meter.d.ts +0 -110
  819. package/node_modules/@opentelemetry/api/build/esnext/metrics/Meter.js +0 -17
  820. package/node_modules/@opentelemetry/api/build/esnext/metrics/Meter.js.map +0 -1
  821. package/node_modules/@opentelemetry/api/build/esnext/metrics/MeterProvider.d.ts +0 -17
  822. package/node_modules/@opentelemetry/api/build/esnext/metrics/MeterProvider.js +0 -17
  823. package/node_modules/@opentelemetry/api/build/esnext/metrics/MeterProvider.js.map +0 -1
  824. package/node_modules/@opentelemetry/api/build/esnext/metrics/Metric.d.ts +0 -115
  825. package/node_modules/@opentelemetry/api/build/esnext/metrics/Metric.js +0 -22
  826. package/node_modules/@opentelemetry/api/build/esnext/metrics/Metric.js.map +0 -1
  827. package/node_modules/@opentelemetry/api/build/esnext/metrics/NoopMeter.d.ts +0 -82
  828. package/node_modules/@opentelemetry/api/build/esnext/metrics/NoopMeter.js +0 -113
  829. package/node_modules/@opentelemetry/api/build/esnext/metrics/NoopMeter.js.map +0 -1
  830. package/node_modules/@opentelemetry/api/build/esnext/metrics/NoopMeterProvider.d.ts +0 -11
  831. package/node_modules/@opentelemetry/api/build/esnext/metrics/NoopMeterProvider.js +0 -27
  832. package/node_modules/@opentelemetry/api/build/esnext/metrics/NoopMeterProvider.js.map +0 -1
  833. package/node_modules/@opentelemetry/api/build/esnext/metrics/ObservableResult.d.ts +0 -31
  834. package/node_modules/@opentelemetry/api/build/esnext/metrics/ObservableResult.js +0 -17
  835. package/node_modules/@opentelemetry/api/build/esnext/metrics/ObservableResult.js.map +0 -1
  836. package/node_modules/@opentelemetry/api/build/esnext/metrics-api.d.ts +0 -4
  837. package/node_modules/@opentelemetry/api/build/esnext/metrics-api.js +0 -21
  838. package/node_modules/@opentelemetry/api/build/esnext/metrics-api.js.map +0 -1
  839. package/node_modules/@opentelemetry/api/build/esnext/platform/browser/globalThis.d.ts +0 -10
  840. package/node_modules/@opentelemetry/api/build/esnext/platform/browser/globalThis.js +0 -35
  841. package/node_modules/@opentelemetry/api/build/esnext/platform/browser/globalThis.js.map +0 -1
  842. package/node_modules/@opentelemetry/api/build/esnext/platform/browser/index.d.ts +0 -2
  843. package/node_modules/@opentelemetry/api/build/esnext/platform/browser/index.js +0 -17
  844. package/node_modules/@opentelemetry/api/build/esnext/platform/browser/index.js.map +0 -1
  845. package/node_modules/@opentelemetry/api/build/esnext/platform/index.d.ts +0 -2
  846. package/node_modules/@opentelemetry/api/build/esnext/platform/index.js +0 -17
  847. package/node_modules/@opentelemetry/api/build/esnext/platform/index.js.map +0 -1
  848. package/node_modules/@opentelemetry/api/build/esnext/platform/node/globalThis.d.ts +0 -3
  849. package/node_modules/@opentelemetry/api/build/esnext/platform/node/globalThis.js +0 -19
  850. package/node_modules/@opentelemetry/api/build/esnext/platform/node/globalThis.js.map +0 -1
  851. package/node_modules/@opentelemetry/api/build/esnext/platform/node/index.d.ts +0 -2
  852. package/node_modules/@opentelemetry/api/build/esnext/platform/node/index.js +0 -17
  853. package/node_modules/@opentelemetry/api/build/esnext/platform/node/index.js.map +0 -1
  854. package/node_modules/@opentelemetry/api/build/esnext/propagation/NoopTextMapPropagator.d.ts +0 -13
  855. package/node_modules/@opentelemetry/api/build/esnext/propagation/NoopTextMapPropagator.js +0 -30
  856. package/node_modules/@opentelemetry/api/build/esnext/propagation/NoopTextMapPropagator.js.map +0 -1
  857. package/node_modules/@opentelemetry/api/build/esnext/propagation/TextMapPropagator.d.ts +0 -84
  858. package/node_modules/@opentelemetry/api/build/esnext/propagation/TextMapPropagator.js +0 -38
  859. package/node_modules/@opentelemetry/api/build/esnext/propagation/TextMapPropagator.js.map +0 -1
  860. package/node_modules/@opentelemetry/api/build/esnext/propagation-api.d.ts +0 -4
  861. package/node_modules/@opentelemetry/api/build/esnext/propagation-api.js +0 -21
  862. package/node_modules/@opentelemetry/api/build/esnext/propagation-api.js.map +0 -1
  863. package/node_modules/@opentelemetry/api/build/esnext/trace/NonRecordingSpan.d.ts +0 -28
  864. package/node_modules/@opentelemetry/api/build/esnext/trace/NonRecordingSpan.js +0 -65
  865. package/node_modules/@opentelemetry/api/build/esnext/trace/NonRecordingSpan.js.map +0 -1
  866. package/node_modules/@opentelemetry/api/build/esnext/trace/NoopTracer.d.ts +0 -14
  867. package/node_modules/@opentelemetry/api/build/esnext/trace/NoopTracer.js +0 -71
  868. package/node_modules/@opentelemetry/api/build/esnext/trace/NoopTracer.js.map +0 -1
  869. package/node_modules/@opentelemetry/api/build/esnext/trace/NoopTracerProvider.d.ts +0 -13
  870. package/node_modules/@opentelemetry/api/build/esnext/trace/NoopTracerProvider.js +0 -28
  871. package/node_modules/@opentelemetry/api/build/esnext/trace/NoopTracerProvider.js.map +0 -1
  872. package/node_modules/@opentelemetry/api/build/esnext/trace/ProxyTracer.d.ts +0 -27
  873. package/node_modules/@opentelemetry/api/build/esnext/trace/ProxyTracer.js +0 -51
  874. package/node_modules/@opentelemetry/api/build/esnext/trace/ProxyTracer.js.map +0 -1
  875. package/node_modules/@opentelemetry/api/build/esnext/trace/ProxyTracerProvider.d.ts +0 -25
  876. package/node_modules/@opentelemetry/api/build/esnext/trace/ProxyTracerProvider.js +0 -50
  877. package/node_modules/@opentelemetry/api/build/esnext/trace/ProxyTracerProvider.js.map +0 -1
  878. package/node_modules/@opentelemetry/api/build/esnext/trace/Sampler.d.ts +0 -31
  879. package/node_modules/@opentelemetry/api/build/esnext/trace/Sampler.js +0 -17
  880. package/node_modules/@opentelemetry/api/build/esnext/trace/Sampler.js.map +0 -1
  881. package/node_modules/@opentelemetry/api/build/esnext/trace/SamplingResult.d.ts +0 -49
  882. package/node_modules/@opentelemetry/api/build/esnext/trace/SamplingResult.js +0 -39
  883. package/node_modules/@opentelemetry/api/build/esnext/trace/SamplingResult.js.map +0 -1
  884. package/node_modules/@opentelemetry/api/build/esnext/trace/SpanOptions.d.ts +0 -23
  885. package/node_modules/@opentelemetry/api/build/esnext/trace/SpanOptions.js +0 -17
  886. package/node_modules/@opentelemetry/api/build/esnext/trace/SpanOptions.js.map +0 -1
  887. package/node_modules/@opentelemetry/api/build/esnext/trace/attributes.d.ts +0 -10
  888. package/node_modules/@opentelemetry/api/build/esnext/trace/attributes.js +0 -17
  889. package/node_modules/@opentelemetry/api/build/esnext/trace/attributes.js.map +0 -1
  890. package/node_modules/@opentelemetry/api/build/esnext/trace/context-utils.d.ts +0 -41
  891. package/node_modules/@opentelemetry/api/build/esnext/trace/context-utils.js +0 -73
  892. package/node_modules/@opentelemetry/api/build/esnext/trace/context-utils.js.map +0 -1
  893. package/node_modules/@opentelemetry/api/build/esnext/trace/internal/tracestate-impl.d.ts +0 -22
  894. package/node_modules/@opentelemetry/api/build/esnext/trace/internal/tracestate-impl.js +0 -99
  895. package/node_modules/@opentelemetry/api/build/esnext/trace/internal/tracestate-impl.js.map +0 -1
  896. package/node_modules/@opentelemetry/api/build/esnext/trace/internal/tracestate-validators.d.ts +0 -15
  897. package/node_modules/@opentelemetry/api/build/esnext/trace/internal/tracestate-validators.js +0 -41
  898. package/node_modules/@opentelemetry/api/build/esnext/trace/internal/tracestate-validators.js.map +0 -1
  899. package/node_modules/@opentelemetry/api/build/esnext/trace/internal/utils.d.ts +0 -3
  900. package/node_modules/@opentelemetry/api/build/esnext/trace/internal/utils.js +0 -20
  901. package/node_modules/@opentelemetry/api/build/esnext/trace/internal/utils.js.map +0 -1
  902. package/node_modules/@opentelemetry/api/build/esnext/trace/invalid-span-constants.d.ts +0 -5
  903. package/node_modules/@opentelemetry/api/build/esnext/trace/invalid-span-constants.js +0 -24
  904. package/node_modules/@opentelemetry/api/build/esnext/trace/invalid-span-constants.js.map +0 -1
  905. package/node_modules/@opentelemetry/api/build/esnext/trace/link.d.ts +0 -26
  906. package/node_modules/@opentelemetry/api/build/esnext/trace/link.js +0 -17
  907. package/node_modules/@opentelemetry/api/build/esnext/trace/link.js.map +0 -1
  908. package/node_modules/@opentelemetry/api/build/esnext/trace/span.d.ts +0 -120
  909. package/node_modules/@opentelemetry/api/build/esnext/trace/span.js +0 -17
  910. package/node_modules/@opentelemetry/api/build/esnext/trace/span.js.map +0 -1
  911. package/node_modules/@opentelemetry/api/build/esnext/trace/span_context.d.ts +0 -53
  912. package/node_modules/@opentelemetry/api/build/esnext/trace/span_context.js +0 -17
  913. package/node_modules/@opentelemetry/api/build/esnext/trace/span_context.js.map +0 -1
  914. package/node_modules/@opentelemetry/api/build/esnext/trace/span_kind.d.ts +0 -27
  915. package/node_modules/@opentelemetry/api/build/esnext/trace/span_kind.js +0 -43
  916. package/node_modules/@opentelemetry/api/build/esnext/trace/span_kind.js.map +0 -1
  917. package/node_modules/@opentelemetry/api/build/esnext/trace/spancontext-utils.d.ts +0 -17
  918. package/node_modules/@opentelemetry/api/build/esnext/trace/spancontext-utils.js +0 -42
  919. package/node_modules/@opentelemetry/api/build/esnext/trace/spancontext-utils.js.map +0 -1
  920. package/node_modules/@opentelemetry/api/build/esnext/trace/status.d.ts +0 -25
  921. package/node_modules/@opentelemetry/api/build/esnext/trace/status.js +0 -20
  922. package/node_modules/@opentelemetry/api/build/esnext/trace/status.js.map +0 -1
  923. package/node_modules/@opentelemetry/api/build/esnext/trace/trace_flags.d.ts +0 -7
  924. package/node_modules/@opentelemetry/api/build/esnext/trace/trace_flags.js +0 -23
  925. package/node_modules/@opentelemetry/api/build/esnext/trace/trace_flags.js.map +0 -1
  926. package/node_modules/@opentelemetry/api/build/esnext/trace/trace_state.d.ts +0 -38
  927. package/node_modules/@opentelemetry/api/build/esnext/trace/trace_state.js +0 -17
  928. package/node_modules/@opentelemetry/api/build/esnext/trace/trace_state.js.map +0 -1
  929. package/node_modules/@opentelemetry/api/build/esnext/trace/tracer.d.ts +0 -71
  930. package/node_modules/@opentelemetry/api/build/esnext/trace/tracer.js +0 -17
  931. package/node_modules/@opentelemetry/api/build/esnext/trace/tracer.js.map +0 -1
  932. package/node_modules/@opentelemetry/api/build/esnext/trace/tracer_options.d.ts +0 -10
  933. package/node_modules/@opentelemetry/api/build/esnext/trace/tracer_options.js +0 -17
  934. package/node_modules/@opentelemetry/api/build/esnext/trace/tracer_options.js.map +0 -1
  935. package/node_modules/@opentelemetry/api/build/esnext/trace/tracer_provider.d.ts +0 -21
  936. package/node_modules/@opentelemetry/api/build/esnext/trace/tracer_provider.js +0 -17
  937. package/node_modules/@opentelemetry/api/build/esnext/trace/tracer_provider.js.map +0 -1
  938. package/node_modules/@opentelemetry/api/build/esnext/trace-api.d.ts +0 -4
  939. package/node_modules/@opentelemetry/api/build/esnext/trace-api.js +0 -21
  940. package/node_modules/@opentelemetry/api/build/esnext/trace-api.js.map +0 -1
  941. package/node_modules/@opentelemetry/api/build/esnext/version.d.ts +0 -2
  942. package/node_modules/@opentelemetry/api/build/esnext/version.js +0 -18
  943. package/node_modules/@opentelemetry/api/build/esnext/version.js.map +0 -1
  944. package/node_modules/@opentelemetry/api/build/src/api/context.d.ts +0 -41
  945. package/node_modules/@opentelemetry/api/build/src/api/context.js +0 -81
  946. package/node_modules/@opentelemetry/api/build/src/api/context.js.map +0 -1
  947. package/node_modules/@opentelemetry/api/build/src/api/diag.d.ts +0 -30
  948. package/node_modules/@opentelemetry/api/build/src/api/diag.js +0 -93
  949. package/node_modules/@opentelemetry/api/build/src/api/diag.js.map +0 -1
  950. package/node_modules/@opentelemetry/api/build/src/api/metrics.d.ts +0 -28
  951. package/node_modules/@opentelemetry/api/build/src/api/metrics.js +0 -61
  952. package/node_modules/@opentelemetry/api/build/src/api/metrics.js.map +0 -1
  953. package/node_modules/@opentelemetry/api/build/src/api/propagation.d.ts +0 -49
  954. package/node_modules/@opentelemetry/api/build/src/api/propagation.js +0 -89
  955. package/node_modules/@opentelemetry/api/build/src/api/propagation.js.map +0 -1
  956. package/node_modules/@opentelemetry/api/build/src/api/trace.d.ts +0 -40
  957. package/node_modules/@opentelemetry/api/build/src/api/trace.js +0 -79
  958. package/node_modules/@opentelemetry/api/build/src/api/trace.js.map +0 -1
  959. package/node_modules/@opentelemetry/api/build/src/baggage/context-helpers.d.ts +0 -29
  960. package/node_modules/@opentelemetry/api/build/src/baggage/context-helpers.js +0 -63
  961. package/node_modules/@opentelemetry/api/build/src/baggage/context-helpers.js.map +0 -1
  962. package/node_modules/@opentelemetry/api/build/src/baggage/internal/baggage-impl.d.ts +0 -12
  963. package/node_modules/@opentelemetry/api/build/src/baggage/internal/baggage-impl.js +0 -55
  964. package/node_modules/@opentelemetry/api/build/src/baggage/internal/baggage-impl.js.map +0 -1
  965. package/node_modules/@opentelemetry/api/build/src/baggage/internal/symbol.d.ts +0 -5
  966. package/node_modules/@opentelemetry/api/build/src/baggage/internal/symbol.js +0 -23
  967. package/node_modules/@opentelemetry/api/build/src/baggage/internal/symbol.js.map +0 -1
  968. package/node_modules/@opentelemetry/api/build/src/baggage/types.d.ts +0 -60
  969. package/node_modules/@opentelemetry/api/build/src/baggage/types.js +0 -18
  970. package/node_modules/@opentelemetry/api/build/src/baggage/types.js.map +0 -1
  971. package/node_modules/@opentelemetry/api/build/src/baggage/utils.d.ts +0 -15
  972. package/node_modules/@opentelemetry/api/build/src/baggage/utils.js +0 -51
  973. package/node_modules/@opentelemetry/api/build/src/baggage/utils.js.map +0 -1
  974. package/node_modules/@opentelemetry/api/build/src/common/Attributes.d.ts +0 -15
  975. package/node_modules/@opentelemetry/api/build/src/common/Attributes.js +0 -18
  976. package/node_modules/@opentelemetry/api/build/src/common/Attributes.js.map +0 -1
  977. package/node_modules/@opentelemetry/api/build/src/common/Exception.d.ts +0 -26
  978. package/node_modules/@opentelemetry/api/build/src/common/Exception.js +0 -18
  979. package/node_modules/@opentelemetry/api/build/src/common/Exception.js.map +0 -1
  980. package/node_modules/@opentelemetry/api/build/src/common/Time.d.ts +0 -20
  981. package/node_modules/@opentelemetry/api/build/src/common/Time.js +0 -3
  982. package/node_modules/@opentelemetry/api/build/src/common/Time.js.map +0 -1
  983. package/node_modules/@opentelemetry/api/build/src/context/NoopContextManager.d.ts +0 -9
  984. package/node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js +0 -38
  985. package/node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js.map +0 -1
  986. package/node_modules/@opentelemetry/api/build/src/context/context.d.ts +0 -6
  987. package/node_modules/@opentelemetry/api/build/src/context/context.js +0 -55
  988. package/node_modules/@opentelemetry/api/build/src/context/context.js.map +0 -1
  989. package/node_modules/@opentelemetry/api/build/src/context/types.d.ts +0 -52
  990. package/node_modules/@opentelemetry/api/build/src/context/types.js +0 -18
  991. package/node_modules/@opentelemetry/api/build/src/context/types.js.map +0 -1
  992. package/node_modules/@opentelemetry/api/build/src/context-api.d.ts +0 -4
  993. package/node_modules/@opentelemetry/api/build/src/context-api.js +0 -24
  994. package/node_modules/@opentelemetry/api/build/src/context-api.js.map +0 -1
  995. package/node_modules/@opentelemetry/api/build/src/diag/ComponentLogger.d.ts +0 -20
  996. package/node_modules/@opentelemetry/api/build/src/diag/ComponentLogger.js +0 -59
  997. package/node_modules/@opentelemetry/api/build/src/diag/ComponentLogger.js.map +0 -1
  998. package/node_modules/@opentelemetry/api/build/src/diag/consoleLogger.d.ts +0 -38
  999. package/node_modules/@opentelemetry/api/build/src/diag/consoleLogger.js +0 -57
  1000. package/node_modules/@opentelemetry/api/build/src/diag/consoleLogger.js.map +0 -1
  1001. package/node_modules/@opentelemetry/api/build/src/diag/internal/logLevelLogger.d.ts +0 -3
  1002. package/node_modules/@opentelemetry/api/build/src/diag/internal/logLevelLogger.js +0 -45
  1003. package/node_modules/@opentelemetry/api/build/src/diag/internal/logLevelLogger.js.map +0 -1
  1004. package/node_modules/@opentelemetry/api/build/src/diag/internal/noopLogger.d.ts +0 -8
  1005. package/node_modules/@opentelemetry/api/build/src/diag/internal/noopLogger.js +0 -35
  1006. package/node_modules/@opentelemetry/api/build/src/diag/internal/noopLogger.js.map +0 -1
  1007. package/node_modules/@opentelemetry/api/build/src/diag/types.d.ts +0 -100
  1008. package/node_modules/@opentelemetry/api/build/src/diag/types.js +0 -44
  1009. package/node_modules/@opentelemetry/api/build/src/diag/types.js.map +0 -1
  1010. package/node_modules/@opentelemetry/api/build/src/diag-api.d.ts +0 -9
  1011. package/node_modules/@opentelemetry/api/build/src/diag-api.js +0 -29
  1012. package/node_modules/@opentelemetry/api/build/src/diag-api.js.map +0 -1
  1013. package/node_modules/@opentelemetry/api/build/src/experimental/index.d.ts +0 -3
  1014. package/node_modules/@opentelemetry/api/build/src/experimental/index.js +0 -22
  1015. package/node_modules/@opentelemetry/api/build/src/experimental/index.js.map +0 -1
  1016. package/node_modules/@opentelemetry/api/build/src/experimental/trace/SugaredOptions.d.ts +0 -13
  1017. package/node_modules/@opentelemetry/api/build/src/experimental/trace/SugaredOptions.js +0 -18
  1018. package/node_modules/@opentelemetry/api/build/src/experimental/trace/SugaredOptions.js.map +0 -1
  1019. package/node_modules/@opentelemetry/api/build/src/experimental/trace/SugaredTracer.d.ts +0 -64
  1020. package/node_modules/@opentelemetry/api/build/src/experimental/trace/SugaredTracer.js +0 -93
  1021. package/node_modules/@opentelemetry/api/build/src/experimental/trace/SugaredTracer.js.map +0 -1
  1022. package/node_modules/@opentelemetry/api/build/src/index.d.ts +0 -54
  1023. package/node_modules/@opentelemetry/api/build/src/index.js +0 -81
  1024. package/node_modules/@opentelemetry/api/build/src/index.js.map +0 -1
  1025. package/node_modules/@opentelemetry/api/build/src/internal/global-utils.d.ts +0 -18
  1026. package/node_modules/@opentelemetry/api/build/src/internal/global-utils.js +0 -64
  1027. package/node_modules/@opentelemetry/api/build/src/internal/global-utils.js.map +0 -1
  1028. package/node_modules/@opentelemetry/api/build/src/internal/semver.d.ts +0 -34
  1029. package/node_modules/@opentelemetry/api/build/src/internal/semver.js +0 -122
  1030. package/node_modules/@opentelemetry/api/build/src/internal/semver.js.map +0 -1
  1031. package/node_modules/@opentelemetry/api/build/src/metrics/Meter.d.ts +0 -110
  1032. package/node_modules/@opentelemetry/api/build/src/metrics/Meter.js +0 -18
  1033. package/node_modules/@opentelemetry/api/build/src/metrics/Meter.js.map +0 -1
  1034. package/node_modules/@opentelemetry/api/build/src/metrics/MeterProvider.d.ts +0 -17
  1035. package/node_modules/@opentelemetry/api/build/src/metrics/MeterProvider.js +0 -18
  1036. package/node_modules/@opentelemetry/api/build/src/metrics/MeterProvider.js.map +0 -1
  1037. package/node_modules/@opentelemetry/api/build/src/metrics/Metric.d.ts +0 -115
  1038. package/node_modules/@opentelemetry/api/build/src/metrics/Metric.js +0 -25
  1039. package/node_modules/@opentelemetry/api/build/src/metrics/Metric.js.map +0 -1
  1040. package/node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.d.ts +0 -82
  1041. package/node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js +0 -127
  1042. package/node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js.map +0 -1
  1043. package/node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.d.ts +0 -11
  1044. package/node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js +0 -31
  1045. package/node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js.map +0 -1
  1046. package/node_modules/@opentelemetry/api/build/src/metrics/ObservableResult.d.ts +0 -31
  1047. package/node_modules/@opentelemetry/api/build/src/metrics/ObservableResult.js +0 -18
  1048. package/node_modules/@opentelemetry/api/build/src/metrics/ObservableResult.js.map +0 -1
  1049. package/node_modules/@opentelemetry/api/build/src/metrics-api.d.ts +0 -4
  1050. package/node_modules/@opentelemetry/api/build/src/metrics-api.js +0 -24
  1051. package/node_modules/@opentelemetry/api/build/src/metrics-api.js.map +0 -1
  1052. package/node_modules/@opentelemetry/api/build/src/platform/browser/globalThis.d.ts +0 -10
  1053. package/node_modules/@opentelemetry/api/build/src/platform/browser/globalThis.js +0 -38
  1054. package/node_modules/@opentelemetry/api/build/src/platform/browser/globalThis.js.map +0 -1
  1055. package/node_modules/@opentelemetry/api/build/src/platform/browser/index.d.ts +0 -2
  1056. package/node_modules/@opentelemetry/api/build/src/platform/browser/index.js +0 -29
  1057. package/node_modules/@opentelemetry/api/build/src/platform/browser/index.js.map +0 -1
  1058. package/node_modules/@opentelemetry/api/build/src/platform/index.d.ts +0 -2
  1059. package/node_modules/@opentelemetry/api/build/src/platform/index.js +0 -29
  1060. package/node_modules/@opentelemetry/api/build/src/platform/index.js.map +0 -1
  1061. package/node_modules/@opentelemetry/api/build/src/platform/node/globalThis.d.ts +0 -3
  1062. package/node_modules/@opentelemetry/api/build/src/platform/node/globalThis.js +0 -22
  1063. package/node_modules/@opentelemetry/api/build/src/platform/node/globalThis.js.map +0 -1
  1064. package/node_modules/@opentelemetry/api/build/src/platform/node/index.d.ts +0 -2
  1065. package/node_modules/@opentelemetry/api/build/src/platform/node/index.js +0 -29
  1066. package/node_modules/@opentelemetry/api/build/src/platform/node/index.js.map +0 -1
  1067. package/node_modules/@opentelemetry/api/build/src/propagation/NoopTextMapPropagator.d.ts +0 -13
  1068. package/node_modules/@opentelemetry/api/build/src/propagation/NoopTextMapPropagator.js +0 -34
  1069. package/node_modules/@opentelemetry/api/build/src/propagation/NoopTextMapPropagator.js.map +0 -1
  1070. package/node_modules/@opentelemetry/api/build/src/propagation/TextMapPropagator.d.ts +0 -84
  1071. package/node_modules/@opentelemetry/api/build/src/propagation/TextMapPropagator.js +0 -41
  1072. package/node_modules/@opentelemetry/api/build/src/propagation/TextMapPropagator.js.map +0 -1
  1073. package/node_modules/@opentelemetry/api/build/src/propagation-api.d.ts +0 -4
  1074. package/node_modules/@opentelemetry/api/build/src/propagation-api.js +0 -24
  1075. package/node_modules/@opentelemetry/api/build/src/propagation-api.js.map +0 -1
  1076. package/node_modules/@opentelemetry/api/build/src/trace/NonRecordingSpan.d.ts +0 -28
  1077. package/node_modules/@opentelemetry/api/build/src/trace/NonRecordingSpan.js +0 -69
  1078. package/node_modules/@opentelemetry/api/build/src/trace/NonRecordingSpan.js.map +0 -1
  1079. package/node_modules/@opentelemetry/api/build/src/trace/NoopTracer.d.ts +0 -14
  1080. package/node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js +0 -75
  1081. package/node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js.map +0 -1
  1082. package/node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.d.ts +0 -13
  1083. package/node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js +0 -32
  1084. package/node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js.map +0 -1
  1085. package/node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.d.ts +0 -27
  1086. package/node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.js +0 -55
  1087. package/node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.js.map +0 -1
  1088. package/node_modules/@opentelemetry/api/build/src/trace/ProxyTracerProvider.d.ts +0 -25
  1089. package/node_modules/@opentelemetry/api/build/src/trace/ProxyTracerProvider.js +0 -54
  1090. package/node_modules/@opentelemetry/api/build/src/trace/ProxyTracerProvider.js.map +0 -1
  1091. package/node_modules/@opentelemetry/api/build/src/trace/Sampler.d.ts +0 -31
  1092. package/node_modules/@opentelemetry/api/build/src/trace/Sampler.js +0 -18
  1093. package/node_modules/@opentelemetry/api/build/src/trace/Sampler.js.map +0 -1
  1094. package/node_modules/@opentelemetry/api/build/src/trace/SamplingResult.d.ts +0 -49
  1095. package/node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js +0 -42
  1096. package/node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js.map +0 -1
  1097. package/node_modules/@opentelemetry/api/build/src/trace/SpanOptions.d.ts +0 -23
  1098. package/node_modules/@opentelemetry/api/build/src/trace/SpanOptions.js +0 -18
  1099. package/node_modules/@opentelemetry/api/build/src/trace/SpanOptions.js.map +0 -1
  1100. package/node_modules/@opentelemetry/api/build/src/trace/attributes.d.ts +0 -10
  1101. package/node_modules/@opentelemetry/api/build/src/trace/attributes.js +0 -18
  1102. package/node_modules/@opentelemetry/api/build/src/trace/attributes.js.map +0 -1
  1103. package/node_modules/@opentelemetry/api/build/src/trace/context-utils.d.ts +0 -41
  1104. package/node_modules/@opentelemetry/api/build/src/trace/context-utils.js +0 -82
  1105. package/node_modules/@opentelemetry/api/build/src/trace/context-utils.js.map +0 -1
  1106. package/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.d.ts +0 -22
  1107. package/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js +0 -103
  1108. package/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js.map +0 -1
  1109. package/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.d.ts +0 -15
  1110. package/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js +0 -46
  1111. package/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js.map +0 -1
  1112. package/node_modules/@opentelemetry/api/build/src/trace/internal/utils.d.ts +0 -3
  1113. package/node_modules/@opentelemetry/api/build/src/trace/internal/utils.js +0 -24
  1114. package/node_modules/@opentelemetry/api/build/src/trace/internal/utils.js.map +0 -1
  1115. package/node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.d.ts +0 -5
  1116. package/node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js +0 -27
  1117. package/node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js.map +0 -1
  1118. package/node_modules/@opentelemetry/api/build/src/trace/link.d.ts +0 -26
  1119. package/node_modules/@opentelemetry/api/build/src/trace/link.js +0 -18
  1120. package/node_modules/@opentelemetry/api/build/src/trace/link.js.map +0 -1
  1121. package/node_modules/@opentelemetry/api/build/src/trace/span.d.ts +0 -120
  1122. package/node_modules/@opentelemetry/api/build/src/trace/span.js +0 -18
  1123. package/node_modules/@opentelemetry/api/build/src/trace/span.js.map +0 -1
  1124. package/node_modules/@opentelemetry/api/build/src/trace/span_context.d.ts +0 -53
  1125. package/node_modules/@opentelemetry/api/build/src/trace/span_context.js +0 -18
  1126. package/node_modules/@opentelemetry/api/build/src/trace/span_context.js.map +0 -1
  1127. package/node_modules/@opentelemetry/api/build/src/trace/span_kind.d.ts +0 -27
  1128. package/node_modules/@opentelemetry/api/build/src/trace/span_kind.js +0 -46
  1129. package/node_modules/@opentelemetry/api/build/src/trace/span_kind.js.map +0 -1
  1130. package/node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.d.ts +0 -17
  1131. package/node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js +0 -49
  1132. package/node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js.map +0 -1
  1133. package/node_modules/@opentelemetry/api/build/src/trace/status.d.ts +0 -25
  1134. package/node_modules/@opentelemetry/api/build/src/trace/status.js +0 -23
  1135. package/node_modules/@opentelemetry/api/build/src/trace/status.js.map +0 -1
  1136. package/node_modules/@opentelemetry/api/build/src/trace/trace_flags.d.ts +0 -7
  1137. package/node_modules/@opentelemetry/api/build/src/trace/trace_flags.js +0 -26
  1138. package/node_modules/@opentelemetry/api/build/src/trace/trace_flags.js.map +0 -1
  1139. package/node_modules/@opentelemetry/api/build/src/trace/trace_state.d.ts +0 -38
  1140. package/node_modules/@opentelemetry/api/build/src/trace/trace_state.js +0 -18
  1141. package/node_modules/@opentelemetry/api/build/src/trace/trace_state.js.map +0 -1
  1142. package/node_modules/@opentelemetry/api/build/src/trace/tracer.d.ts +0 -71
  1143. package/node_modules/@opentelemetry/api/build/src/trace/tracer.js +0 -18
  1144. package/node_modules/@opentelemetry/api/build/src/trace/tracer.js.map +0 -1
  1145. package/node_modules/@opentelemetry/api/build/src/trace/tracer_options.d.ts +0 -10
  1146. package/node_modules/@opentelemetry/api/build/src/trace/tracer_options.js +0 -18
  1147. package/node_modules/@opentelemetry/api/build/src/trace/tracer_options.js.map +0 -1
  1148. package/node_modules/@opentelemetry/api/build/src/trace/tracer_provider.d.ts +0 -21
  1149. package/node_modules/@opentelemetry/api/build/src/trace/tracer_provider.js +0 -18
  1150. package/node_modules/@opentelemetry/api/build/src/trace/tracer_provider.js.map +0 -1
  1151. package/node_modules/@opentelemetry/api/build/src/trace-api.d.ts +0 -4
  1152. package/node_modules/@opentelemetry/api/build/src/trace-api.js +0 -24
  1153. package/node_modules/@opentelemetry/api/build/src/trace-api.js.map +0 -1
  1154. package/node_modules/@opentelemetry/api/build/src/version.d.ts +0 -2
  1155. package/node_modules/@opentelemetry/api/build/src/version.js +0 -21
  1156. package/node_modules/@opentelemetry/api/build/src/version.js.map +0 -1
  1157. package/node_modules/@opentelemetry/api/package.json +0 -113
  1158. package/node_modules/glob/LICENSE.md +0 -63
  1159. package/node_modules/glob/README.md +0 -1203
  1160. package/node_modules/glob/dist/commonjs/glob.d.ts +0 -396
  1161. package/node_modules/glob/dist/commonjs/glob.d.ts.map +0 -1
  1162. package/node_modules/glob/dist/commonjs/glob.js +0 -248
  1163. package/node_modules/glob/dist/commonjs/glob.js.map +0 -1
  1164. package/node_modules/glob/dist/commonjs/has-magic.d.ts +0 -14
  1165. package/node_modules/glob/dist/commonjs/has-magic.d.ts.map +0 -1
  1166. package/node_modules/glob/dist/commonjs/has-magic.js +0 -27
  1167. package/node_modules/glob/dist/commonjs/has-magic.js.map +0 -1
  1168. package/node_modules/glob/dist/commonjs/ignore.d.ts +0 -24
  1169. package/node_modules/glob/dist/commonjs/ignore.d.ts.map +0 -1
  1170. package/node_modules/glob/dist/commonjs/ignore.js +0 -119
  1171. package/node_modules/glob/dist/commonjs/ignore.js.map +0 -1
  1172. package/node_modules/glob/dist/commonjs/index.d.ts +0 -97
  1173. package/node_modules/glob/dist/commonjs/index.d.ts.map +0 -1
  1174. package/node_modules/glob/dist/commonjs/index.js +0 -68
  1175. package/node_modules/glob/dist/commonjs/index.js.map +0 -1
  1176. package/node_modules/glob/dist/commonjs/index.min.js +0 -4
  1177. package/node_modules/glob/dist/commonjs/index.min.js.map +0 -7
  1178. package/node_modules/glob/dist/commonjs/package.json +0 -3
  1179. package/node_modules/glob/dist/commonjs/pattern.d.ts +0 -79
  1180. package/node_modules/glob/dist/commonjs/pattern.d.ts.map +0 -1
  1181. package/node_modules/glob/dist/commonjs/pattern.js +0 -223
  1182. package/node_modules/glob/dist/commonjs/pattern.js.map +0 -1
  1183. package/node_modules/glob/dist/commonjs/processor.d.ts +0 -59
  1184. package/node_modules/glob/dist/commonjs/processor.d.ts.map +0 -1
  1185. package/node_modules/glob/dist/commonjs/processor.js +0 -301
  1186. package/node_modules/glob/dist/commonjs/processor.js.map +0 -1
  1187. package/node_modules/glob/dist/commonjs/walker.d.ts +0 -97
  1188. package/node_modules/glob/dist/commonjs/walker.d.ts.map +0 -1
  1189. package/node_modules/glob/dist/commonjs/walker.js +0 -387
  1190. package/node_modules/glob/dist/commonjs/walker.js.map +0 -1
  1191. package/node_modules/glob/dist/esm/glob.d.ts +0 -396
  1192. package/node_modules/glob/dist/esm/glob.d.ts.map +0 -1
  1193. package/node_modules/glob/dist/esm/glob.js +0 -244
  1194. package/node_modules/glob/dist/esm/glob.js.map +0 -1
  1195. package/node_modules/glob/dist/esm/has-magic.d.ts +0 -14
  1196. package/node_modules/glob/dist/esm/has-magic.d.ts.map +0 -1
  1197. package/node_modules/glob/dist/esm/has-magic.js +0 -23
  1198. package/node_modules/glob/dist/esm/has-magic.js.map +0 -1
  1199. package/node_modules/glob/dist/esm/ignore.d.ts +0 -24
  1200. package/node_modules/glob/dist/esm/ignore.d.ts.map +0 -1
  1201. package/node_modules/glob/dist/esm/ignore.js +0 -115
  1202. package/node_modules/glob/dist/esm/ignore.js.map +0 -1
  1203. package/node_modules/glob/dist/esm/index.d.ts +0 -97
  1204. package/node_modules/glob/dist/esm/index.d.ts.map +0 -1
  1205. package/node_modules/glob/dist/esm/index.js +0 -55
  1206. package/node_modules/glob/dist/esm/index.js.map +0 -1
  1207. package/node_modules/glob/dist/esm/index.min.js +0 -4
  1208. package/node_modules/glob/dist/esm/index.min.js.map +0 -7
  1209. package/node_modules/glob/dist/esm/package.json +0 -3
  1210. package/node_modules/glob/dist/esm/pattern.d.ts +0 -79
  1211. package/node_modules/glob/dist/esm/pattern.d.ts.map +0 -1
  1212. package/node_modules/glob/dist/esm/pattern.js +0 -219
  1213. package/node_modules/glob/dist/esm/pattern.js.map +0 -1
  1214. package/node_modules/glob/dist/esm/processor.d.ts +0 -59
  1215. package/node_modules/glob/dist/esm/processor.d.ts.map +0 -1
  1216. package/node_modules/glob/dist/esm/processor.js +0 -294
  1217. package/node_modules/glob/dist/esm/processor.js.map +0 -1
  1218. package/node_modules/glob/dist/esm/walker.d.ts +0 -97
  1219. package/node_modules/glob/dist/esm/walker.d.ts.map +0 -1
  1220. package/node_modules/glob/dist/esm/walker.js +0 -381
  1221. package/node_modules/glob/dist/esm/walker.js.map +0 -1
  1222. package/node_modules/glob/package.json +0 -98
  1223. package/node_modules/minipass/LICENSE.md +0 -55
  1224. package/node_modules/minipass/README.md +0 -825
  1225. package/node_modules/minipass/dist/commonjs/index.d.ts +0 -545
  1226. package/node_modules/minipass/dist/commonjs/index.d.ts.map +0 -1
  1227. package/node_modules/minipass/dist/commonjs/index.js +0 -1038
  1228. package/node_modules/minipass/dist/commonjs/index.js.map +0 -1
  1229. package/node_modules/minipass/dist/commonjs/package.json +0 -3
  1230. package/node_modules/minipass/dist/esm/index.d.ts +0 -545
  1231. package/node_modules/minipass/dist/esm/index.d.ts.map +0 -1
  1232. package/node_modules/minipass/dist/esm/index.js +0 -1020
  1233. package/node_modules/minipass/dist/esm/index.js.map +0 -1
  1234. package/node_modules/minipass/dist/esm/package.json +0 -3
  1235. package/node_modules/minipass/package.json +0 -77
  1236. package/node_modules/path-scurry/LICENSE.md +0 -55
  1237. package/node_modules/path-scurry/README.md +0 -636
  1238. package/node_modules/path-scurry/dist/commonjs/index.d.ts +0 -1115
  1239. package/node_modules/path-scurry/dist/commonjs/index.d.ts.map +0 -1
  1240. package/node_modules/path-scurry/dist/commonjs/index.js +0 -2018
  1241. package/node_modules/path-scurry/dist/commonjs/index.js.map +0 -1
  1242. package/node_modules/path-scurry/dist/commonjs/package.json +0 -3
  1243. package/node_modules/path-scurry/dist/esm/index.d.ts +0 -1115
  1244. package/node_modules/path-scurry/dist/esm/index.d.ts.map +0 -1
  1245. package/node_modules/path-scurry/dist/esm/index.js +0 -1983
  1246. package/node_modules/path-scurry/dist/esm/index.js.map +0 -1
  1247. package/node_modules/path-scurry/dist/esm/package.json +0 -3
  1248. package/node_modules/path-scurry/package.json +0 -72
@@ -1 +1 @@
1
- {"version":3,"file":"autocomplete.js","sourceRoot":"","sources":["../src/autocomplete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;AAE5D,SAAS,aAAa,CAAC,KAAa,EAAU;IAC7C,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAAA,CACjC;AAED,SAAS,WAAW,CAAC,KAAa,EAAU;IAC3C,OAAO,KAAK,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AAAA,CACpD;AAED,SAAS,gBAAgB,CAAC,KAAa,EAAU;IAChD,MAAM,UAAU,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IACxC,IAAI,CAAC,UAAU,CAAC,QAAQ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AoB,CAAC,WAAW,CAAC,WAAW,EAAE,gBAAgB,CAAC;oBACtE,CAAC,CAAC,gBAAgB,CAAC;gBACpB,MAAM,SAAS,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAAC;gBAC7C,MAAM,cAAc,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,WAAW,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC;gBACrE,MAAM,KAAK,GAAG,oBAAoB,CAAC,cAAc,EAAE;oBAClD,WAAW;oBACX,UAAU,EAAE,IAAI;oBAChB,cAAc,EAAE,OAAO,CAAC,cAAc;iBACtC,CAAC,CAAC;gBAEH,WAAW,CAAC,IAAI,CAAC;oBAChB,KAAK;oBACL,KAAK,EAAE,SAAS,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;oBAC3C,WAAW,EAAE,WAAW;iBACxB,CAAC,CAAC;YACJ,CAAC;YAED,OAAO,WAAW,CAAC;QACpB,CAAC;QAAC,MAAM,CAAC;YACR,OAAO,EAAE,CAAC;QACX,CAAC;IAAA,CACD;IAED,iEAAiE;IACjE,2BAA2B,CAAC,KAAe,EAAE,UAAkB,EAAE,SAAiB,EAAW;QAC5F,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;QAC5C,MAAM,gBAAgB,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;QAEzD,yEAAyE;QACzE,IAAI,gBAAgB,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YACvF,OAAO,KAAK,CAAC;QACd,CAAC;QAED,OAAO,IAAI,CAAC;IAAA,CACZ;CACD","sourcesContent":["import { spawn } from \"child_process\";\nimport { readdirSync, statSync } from \"fs\";\nimport { homedir } from \"os\";\nimport { basename, dirname, join } from \"path\";\nimport { fuzzyFilter } from \"./fuzzy.ts\";\n\nconst PATH_DELIMITERS = new Set([\" \", \"\\t\", '\"', \"'\", \"=\"]);\n\nfunction toDisplayPath(value: string): string {\n\treturn value.replace(/\\\\/g, \"/\");\n}\n\nfunction escapeRegex(value: string): string {\n\treturn value.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\n\nfunction buildFdPathQuery(query: string): string {\n\tconst normalized = toDisplayPath(query);\n\tif (!normalized.includes(\"/\")) {\n\t\treturn normalized;\n\t}\n\n\tconst hasTrailingSeparator = normalized.endsWith(\"/\");\n\tconst trimmed = normalized.replace(/^\\/+|\\/+$/g, \"\");\n\tif (!trimmed) {\n\t\treturn normalized;\n\t}\n\n\tconst separatorPattern = \"[\\\\\\\\/]\";\n\tconst segments = trimmed\n\t\t.split(\"/\")\n\t\t.filter(Boolean)\n\t\t.map((segment) => escapeRegex(segment));\n\tif (segments.length === 0) {\n\t\treturn normalized;\n\t}\n\n\tlet pattern = segments.join(separatorPattern);\n\tif (hasTrailingSeparator) {\n\t\tpattern += separatorPattern;\n\t}\n\treturn pattern;\n}\n\nfunction findLastDelimiter(text: string): number {\n\tfor (let i = text.length - 1; i >= 0; i -= 1) {\n\t\tif (PATH_DELIMITERS.has(text[i] ?? \"\")) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n}\n\nfunction findUnclosedQuoteStart(text: string): number | null {\n\tlet inQuotes = false;\n\tlet quoteStart = -1;\n\n\tfor (let i = 0; i < text.length; i += 1) {\n\t\tif (text[i] === '\"') {\n\t\t\tinQuotes = !inQuotes;\n\t\t\tif (inQuotes) {\n\t\t\t\tquoteStart = i;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn inQuotes ? quoteStart : null;\n}\n\nfunction isTokenStart(text: string, index: number): boolean {\n\treturn index === 0 || PATH_DELIMITERS.has(text[index - 1] ?? \"\");\n}\n\nfunction extractQuotedPrefix(text: string): string | null {\n\tconst quoteStart = findUnclosedQuoteStart(text);\n\tif (quoteStart === null) {\n\t\treturn null;\n\t}\n\n\tif (quoteStart > 0 && text[quoteStart - 1] === \"@\") {\n\t\tif (!isTokenStart(text, quoteStart - 1)) {\n\t\t\treturn null;\n\t\t}\n\t\treturn text.slice(quoteStart - 1);\n\t}\n\n\tif (!isTokenStart(text, quoteStart)) {\n\t\treturn null;\n\t}\n\n\treturn text.slice(quoteStart);\n}\n\nfunction parsePathPrefix(prefix: string): { rawPrefix: string; isAtPrefix: boolean; isQuotedPrefix: boolean } {\n\tif (prefix.startsWith('@\"')) {\n\t\treturn { rawPrefix: prefix.slice(2), isAtPrefix: true, isQuotedPrefix: true };\n\t}\n\tif (prefix.startsWith('\"')) {\n\t\treturn { rawPrefix: prefix.slice(1), isAtPrefix: false, isQuotedPrefix: true };\n\t}\n\tif (prefix.startsWith(\"@\")) {\n\t\treturn { rawPrefix: prefix.slice(1), isAtPrefix: true, isQuotedPrefix: false };\n\t}\n\treturn { rawPrefix: prefix, isAtPrefix: false, isQuotedPrefix: false };\n}\n\nfunction buildCompletionValue(\n\tpath: string,\n\toptions: { isDirectory: boolean; isAtPrefix: boolean; isQuotedPrefix: boolean },\n): string {\n\tconst needsQuotes = options.isQuotedPrefix || path.includes(\" \");\n\tconst prefix = options.isAtPrefix ? \"@\" : \"\";\n\n\tif (!needsQuotes) {\n\t\treturn `${prefix}${path}`;\n\t}\n\n\tconst openQuote = `${prefix}\"`;\n\tconst closeQuote = '\"';\n\treturn `${openQuote}${path}${closeQuote}`;\n}\n\n// Use fd to walk directory tree (fast, respects .gitignore)\nasync function walkDirectoryWithFd(\n\tbaseDir: string,\n\tfdPath: string,\n\tquery: string,\n\tmaxResults: number,\n\tsignal: AbortSignal,\n): Promise<Array<{ path: string; isDirectory: boolean }>> {\n\tconst args = [\n\t\t\"--base-directory\",\n\t\tbaseDir,\n\t\t\"--max-results\",\n\t\tString(maxResults),\n\t\t\"--type\",\n\t\t\"f\",\n\t\t\"--type\",\n\t\t\"d\",\n\t\t\"--follow\",\n\t\t\"--hidden\",\n\t\t\"--exclude\",\n\t\t\".git\",\n\t\t\"--exclude\",\n\t\t\".git/*\",\n\t\t\"--exclude\",\n\t\t\".git/**\",\n\t];\n\n\tif (toDisplayPath(query).includes(\"/\")) {\n\t\targs.push(\"--full-path\");\n\t}\n\n\tif (query) {\n\t\targs.push(buildFdPathQuery(query));\n\t}\n\n\treturn await new Promise((resolve) => {\n\t\tif (signal.aborted) {\n\t\t\tresolve([]);\n\t\t\treturn;\n\t\t}\n\n\t\tconst child = spawn(fdPath, args, {\n\t\t\tstdio: [\"ignore\", \"pipe\", \"pipe\"],\n\t\t});\n\t\tlet stdout = \"\";\n\t\tlet resolved = false;\n\n\t\tconst finish = (results: Array<{ path: string; isDirectory: boolean }>) => {\n\t\t\tif (resolved) return;\n\t\t\tresolved = true;\n\t\t\tsignal.removeEventListener(\"abort\", onAbort);\n\t\t\tresolve(results);\n\t\t};\n\n\t\tconst onAbort = () => {\n\t\t\tif (child.exitCode === null) {\n\t\t\t\tchild.kill(\"SIGKILL\");\n\t\t\t}\n\t\t};\n\n\t\tsignal.addEventListener(\"abort\", onAbort, { once: true });\n\t\tchild.stdout.setEncoding(\"utf-8\");\n\t\tchild.stdout.on(\"data\", (chunk: string) => {\n\t\t\tstdout += chunk;\n\t\t});\n\t\tchild.on(\"error\", () => {\n\t\t\tfinish([]);\n\t\t});\n\t\tchild.on(\"close\", (code) => {\n\t\t\tif (signal.aborted || code !== 0 || !stdout) {\n\t\t\t\tfinish([]);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst lines = stdout.trim().split(\"\\n\").filter(Boolean);\n\t\t\tconst results: Array<{ path: string; isDirectory: boolean }> = [];\n\n\t\t\tfor (const line of lines) {\n\t\t\t\tconst displayLine = toDisplayPath(line);\n\t\t\t\tconst hasTrailingSeparator = displayLine.endsWith(\"/\");\n\t\t\t\tconst normalizedPath = hasTrailingSeparator ? displayLine.slice(0, -1) : displayLine;\n\t\t\t\tif (normalizedPath === \".git\" || normalizedPath.startsWith(\".git/\") || normalizedPath.includes(\"/.git/\")) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tresults.push({\n\t\t\t\t\tpath: displayLine,\n\t\t\t\t\tisDirectory: hasTrailingSeparator,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tfinish(results);\n\t\t});\n\t});\n}\n\nexport interface AutocompleteItem {\n\tvalue: string;\n\tlabel: string;\n\tdescription?: string;\n}\n\ntype Awaitable<T> = T | Promise<T>;\n\nexport interface SlashCommand {\n\tname: string;\n\tdescription?: string;\n\targumentHint?: string;\n\t// Function to get argument completions for this command\n\t// Returns null if no argument completion is available\n\tgetArgumentCompletions?(argumentPrefix: string): Awaitable<AutocompleteItem[] | null>;\n}\n\nexport interface AutocompleteSuggestions {\n\titems: AutocompleteItem[];\n\tprefix: string; // What we're matching against (e.g., \"/\" or \"src/\")\n}\n\nexport interface AutocompleteProvider {\n\t/** Characters that should naturally trigger this provider at token boundaries. */\n\ttriggerCharacters?: string[];\n\n\t// Get autocomplete suggestions for current text/cursor position\n\t// Returns null if no suggestions available\n\tgetSuggestions(\n\t\tlines: string[],\n\t\tcursorLine: number,\n\t\tcursorCol: number,\n\t\toptions: { signal: AbortSignal; force?: boolean },\n\t): Promise<AutocompleteSuggestions | null>;\n\n\t// Apply the selected item\n\t// Returns the new text and cursor position\n\tapplyCompletion(\n\t\tlines: string[],\n\t\tcursorLine: number,\n\t\tcursorCol: number,\n\t\titem: AutocompleteItem,\n\t\tprefix: string,\n\t): {\n\t\tlines: string[];\n\t\tcursorLine: number;\n\t\tcursorCol: number;\n\t};\n\n\t// Check if file completion should trigger for explicit Tab completion\n\tshouldTriggerFileCompletion?(lines: string[], cursorLine: number, cursorCol: number): boolean;\n}\n\n// Combined provider that handles both slash commands and file paths\nexport class CombinedAutocompleteProvider implements AutocompleteProvider {\n\tprivate commands: (SlashCommand | AutocompleteItem)[];\n\tprivate basePath: string;\n\tprivate fdPath: string | null;\n\n\tconstructor(commands: (SlashCommand | AutocompleteItem)[] = [], basePath: string, fdPath: string | null = null) {\n\t\tthis.commands = commands;\n\t\tthis.basePath = basePath;\n\t\tthis.fdPath = fdPath;\n\t}\n\n\tasync getSuggestions(\n\t\tlines: string[],\n\t\tcursorLine: number,\n\t\tcursorCol: number,\n\t\toptions: { signal: AbortSignal; force?: boolean },\n\t): Promise<AutocompleteSuggestions | null> {\n\t\tconst currentLine = lines[cursorLine] || \"\";\n\t\tconst textBeforeCursor = currentLine.slice(0, cursorCol);\n\n\t\tconst atPrefix = this.extractAtPrefix(textBeforeCursor);\n\t\tif (atPrefix) {\n\t\t\tconst { rawPrefix, isQuotedPrefix } = parsePathPrefix(atPrefix);\n\t\t\tconst suggestions = await this.getFuzzyFileSuggestions(rawPrefix, {\n\t\t\t\tisQuotedPrefix,\n\t\t\t\tsignal: options.signal,\n\t\t\t});\n\t\t\tif (suggestions.length === 0) return null;\n\n\t\t\treturn {\n\t\t\t\titems: suggestions,\n\t\t\t\tprefix: atPrefix,\n\t\t\t};\n\t\t}\n\n\t\tif (!options.force && textBeforeCursor.startsWith(\"/\")) {\n\t\t\tconst spaceIndex = textBeforeCursor.indexOf(\" \");\n\n\t\t\tif (spaceIndex === -1) {\n\t\t\t\tconst prefix = textBeforeCursor.slice(1);\n\t\t\t\tconst commandItems = this.commands.map((cmd) => {\n\t\t\t\t\tconst name = \"name\" in cmd ? cmd.name : cmd.value;\n\t\t\t\t\tconst hint = \"argumentHint\" in cmd && cmd.argumentHint ? cmd.argumentHint : undefined;\n\t\t\t\t\tconst desc = cmd.description ?? \"\";\n\t\t\t\t\tconst fullDesc = hint ? (desc ? `${hint} — ${desc}` : hint) : desc;\n\t\t\t\t\treturn {\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tlabel: name,\n\t\t\t\t\t\tdescription: fullDesc || undefined,\n\t\t\t\t\t};\n\t\t\t\t});\n\n\t\t\t\tconst filtered = fuzzyFilter(commandItems, prefix, (item) => item.name).map((item) => ({\n\t\t\t\t\tvalue: item.name,\n\t\t\t\t\tlabel: item.label,\n\t\t\t\t\t...(item.description && { description: item.description }),\n\t\t\t\t}));\n\n\t\t\t\tif (filtered.length === 0) return null;\n\n\t\t\t\treturn {\n\t\t\t\t\titems: filtered,\n\t\t\t\t\tprefix: textBeforeCursor,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst commandName = textBeforeCursor.slice(1, spaceIndex);\n\t\t\tconst argumentText = textBeforeCursor.slice(spaceIndex + 1);\n\n\t\t\tconst command = this.commands.find((cmd) => {\n\t\t\t\tconst name = \"name\" in cmd ? cmd.name : cmd.value;\n\t\t\t\treturn name === commandName;\n\t\t\t});\n\t\t\tif (!command || !(\"getArgumentCompletions\" in command) || !command.getArgumentCompletions) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst argumentSuggestions = await command.getArgumentCompletions(argumentText);\n\t\t\tif (!Array.isArray(argumentSuggestions) || argumentSuggestions.length === 0) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\titems: argumentSuggestions,\n\t\t\t\tprefix: argumentText,\n\t\t\t};\n\t\t}\n\n\t\tconst pathMatch = this.extractPathPrefix(textBeforeCursor, options.force ?? false);\n\t\tif (pathMatch === null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst suggestions = this.getFileSuggestions(pathMatch);\n\t\tif (suggestions.length === 0) return null;\n\n\t\treturn {\n\t\t\titems: suggestions,\n\t\t\tprefix: pathMatch,\n\t\t};\n\t}\n\n\tapplyCompletion(\n\t\tlines: string[],\n\t\tcursorLine: number,\n\t\tcursorCol: number,\n\t\titem: AutocompleteItem,\n\t\tprefix: string,\n\t): { lines: string[]; cursorLine: number; cursorCol: number } {\n\t\tconst currentLine = lines[cursorLine] || \"\";\n\t\tconst beforePrefix = currentLine.slice(0, cursorCol - prefix.length);\n\t\tconst afterCursor = currentLine.slice(cursorCol);\n\t\tconst isQuotedPrefix = prefix.startsWith('\"') || prefix.startsWith('@\"');\n\t\tconst hasLeadingQuoteAfterCursor = afterCursor.startsWith('\"');\n\t\tconst hasTrailingQuoteInItem = item.value.endsWith('\"');\n\t\tconst adjustedAfterCursor =\n\t\t\tisQuotedPrefix && hasTrailingQuoteInItem && hasLeadingQuoteAfterCursor ? afterCursor.slice(1) : afterCursor;\n\n\t\t// Check if we're completing a slash command (prefix starts with \"/\" but NOT a file path)\n\t\t// Slash commands are at the start of the line and don't contain path separators after the first /\n\t\tconst isSlashCommand = prefix.startsWith(\"/\") && beforePrefix.trim() === \"\" && !prefix.slice(1).includes(\"/\");\n\t\tif (isSlashCommand) {\n\t\t\t// This is a command name completion\n\t\t\tconst newLine = `${beforePrefix}/${item.value} ${adjustedAfterCursor}`;\n\t\t\tconst newLines = [...lines];\n\t\t\tnewLines[cursorLine] = newLine;\n\n\t\t\treturn {\n\t\t\t\tlines: newLines,\n\t\t\t\tcursorLine,\n\t\t\t\tcursorCol: beforePrefix.length + item.value.length + 2, // +2 for \"/\" and space\n\t\t\t};\n\t\t}\n\n\t\t// Check if we're completing a file attachment (prefix starts with \"@\")\n\t\tif (prefix.startsWith(\"@\")) {\n\t\t\t// This is a file attachment completion\n\t\t\t// Don't add space after directories so user can continue autocompleting\n\t\t\tconst isDirectory = item.label.endsWith(\"/\");\n\t\t\tconst suffix = isDirectory ? \"\" : \" \";\n\t\t\tconst newLine = `${beforePrefix + item.value}${suffix}${adjustedAfterCursor}`;\n\t\t\tconst newLines = [...lines];\n\t\t\tnewLines[cursorLine] = newLine;\n\n\t\t\tconst hasTrailingQuote = item.value.endsWith('\"');\n\t\t\tconst cursorOffset = isDirectory && hasTrailingQuote ? item.value.length - 1 : item.value.length;\n\n\t\t\treturn {\n\t\t\t\tlines: newLines,\n\t\t\t\tcursorLine,\n\t\t\t\tcursorCol: beforePrefix.length + cursorOffset + suffix.length,\n\t\t\t};\n\t\t}\n\n\t\t// Check if we're in a slash command context (beforePrefix contains \"/command \")\n\t\tconst textBeforeCursor = currentLine.slice(0, cursorCol);\n\t\tif (textBeforeCursor.includes(\"/\") && textBeforeCursor.includes(\" \")) {\n\t\t\t// This is likely a command argument completion\n\t\t\tconst newLine = beforePrefix + item.value + adjustedAfterCursor;\n\t\t\tconst newLines = [...lines];\n\t\t\tnewLines[cursorLine] = newLine;\n\n\t\t\tconst isDirectory = item.label.endsWith(\"/\");\n\t\t\tconst hasTrailingQuote = item.value.endsWith('\"');\n\t\t\tconst cursorOffset = isDirectory && hasTrailingQuote ? item.value.length - 1 : item.value.length;\n\n\t\t\treturn {\n\t\t\t\tlines: newLines,\n\t\t\t\tcursorLine,\n\t\t\t\tcursorCol: beforePrefix.length + cursorOffset,\n\t\t\t};\n\t\t}\n\n\t\t// For file paths, complete the path\n\t\tconst newLine = beforePrefix + item.value + adjustedAfterCursor;\n\t\tconst newLines = [...lines];\n\t\tnewLines[cursorLine] = newLine;\n\n\t\tconst isDirectory = item.label.endsWith(\"/\");\n\t\tconst hasTrailingQuote = item.value.endsWith('\"');\n\t\tconst cursorOffset = isDirectory && hasTrailingQuote ? item.value.length - 1 : item.value.length;\n\n\t\treturn {\n\t\t\tlines: newLines,\n\t\t\tcursorLine,\n\t\t\tcursorCol: beforePrefix.length + cursorOffset,\n\t\t};\n\t}\n\n\t// Extract @ prefix for fuzzy file suggestions\n\tprivate extractAtPrefix(text: string): string | null {\n\t\tconst quotedPrefix = extractQuotedPrefix(text);\n\t\tif (quotedPrefix?.startsWith('@\"')) {\n\t\t\treturn quotedPrefix;\n\t\t}\n\n\t\tconst lastDelimiterIndex = findLastDelimiter(text);\n\t\tconst tokenStart = lastDelimiterIndex === -1 ? 0 : lastDelimiterIndex + 1;\n\n\t\tif (text[tokenStart] === \"@\") {\n\t\t\treturn text.slice(tokenStart);\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t// Extract a path-like prefix from the text before cursor\n\tprivate extractPathPrefix(text: string, forceExtract: boolean = false): string | null {\n\t\tconst quotedPrefix = extractQuotedPrefix(text);\n\t\tif (quotedPrefix) {\n\t\t\treturn quotedPrefix;\n\t\t}\n\n\t\tconst lastDelimiterIndex = findLastDelimiter(text);\n\t\tconst pathPrefix = lastDelimiterIndex === -1 ? text : text.slice(lastDelimiterIndex + 1);\n\n\t\t// For forced extraction (Tab key), always return something\n\t\tif (forceExtract) {\n\t\t\treturn pathPrefix;\n\t\t}\n\n\t\t// For natural triggers, return if it looks like a path, ends with /, starts with ~/, .\n\t\t// Only return empty string if the text looks like it's starting a path context\n\t\tif (pathPrefix.includes(\"/\") || pathPrefix.startsWith(\".\") || pathPrefix.startsWith(\"~/\")) {\n\t\t\treturn pathPrefix;\n\t\t}\n\n\t\t// Return empty string only after a space (not for completely empty text)\n\t\t// Empty text should not trigger file suggestions - that's for forced Tab completion\n\t\tif (pathPrefix === \"\" && text.endsWith(\" \")) {\n\t\t\treturn pathPrefix;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t// Expand home directory (~/) to actual home path\n\tprivate expandHomePath(path: string): string {\n\t\tif (path.startsWith(\"~/\")) {\n\t\t\tconst expandedPath = join(homedir(), path.slice(2));\n\t\t\t// Preserve trailing slash if original path had one\n\t\t\treturn path.endsWith(\"/\") && !expandedPath.endsWith(\"/\") ? `${expandedPath}/` : expandedPath;\n\t\t} else if (path === \"~\") {\n\t\t\treturn homedir();\n\t\t}\n\t\treturn path;\n\t}\n\n\tprivate resolveScopedFuzzyQuery(rawQuery: string): { baseDir: string; query: string; displayBase: string } | null {\n\t\tconst normalizedQuery = toDisplayPath(rawQuery);\n\t\tconst slashIndex = normalizedQuery.lastIndexOf(\"/\");\n\t\tif (slashIndex === -1) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst displayBase = normalizedQuery.slice(0, slashIndex + 1);\n\t\tconst query = normalizedQuery.slice(slashIndex + 1);\n\n\t\tlet baseDir: string;\n\t\tif (displayBase.startsWith(\"~/\")) {\n\t\t\tbaseDir = this.expandHomePath(displayBase);\n\t\t} else if (displayBase.startsWith(\"/\")) {\n\t\t\tbaseDir = displayBase;\n\t\t} else {\n\t\t\tbaseDir = join(this.basePath, displayBase);\n\t\t}\n\n\t\ttry {\n\t\t\tif (!statSync(baseDir).isDirectory()) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} catch {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn { baseDir, query, displayBase };\n\t}\n\n\tprivate scopedPathForDisplay(displayBase: string, relativePath: string): string {\n\t\tconst normalizedRelativePath = toDisplayPath(relativePath);\n\t\tif (displayBase === \"/\") {\n\t\t\treturn `/${normalizedRelativePath}`;\n\t\t}\n\t\treturn `${toDisplayPath(displayBase)}${normalizedRelativePath}`;\n\t}\n\n\t// Get file/directory suggestions for a given path prefix\n\tprivate getFileSuggestions(prefix: string): AutocompleteItem[] {\n\t\ttry {\n\t\t\tlet searchDir: string;\n\t\t\tlet searchPrefix: string;\n\t\t\tconst { rawPrefix, isAtPrefix, isQuotedPrefix } = parsePathPrefix(prefix);\n\t\t\tlet expandedPrefix = rawPrefix;\n\n\t\t\t// Handle home directory expansion\n\t\t\tif (expandedPrefix.startsWith(\"~\")) {\n\t\t\t\texpandedPrefix = this.expandHomePath(expandedPrefix);\n\t\t\t}\n\n\t\t\tconst isRootPrefix =\n\t\t\t\trawPrefix === \"\" ||\n\t\t\t\trawPrefix === \"./\" ||\n\t\t\t\trawPrefix === \"../\" ||\n\t\t\t\trawPrefix === \"~\" ||\n\t\t\t\trawPrefix === \"~/\" ||\n\t\t\t\trawPrefix === \"/\" ||\n\t\t\t\t(isAtPrefix && rawPrefix === \"\");\n\n\t\t\tif (isRootPrefix) {\n\t\t\t\t// Complete from specified position\n\t\t\t\tif (rawPrefix.startsWith(\"~\") || expandedPrefix.startsWith(\"/\")) {\n\t\t\t\t\tsearchDir = expandedPrefix;\n\t\t\t\t} else {\n\t\t\t\t\tsearchDir = join(this.basePath, expandedPrefix);\n\t\t\t\t}\n\t\t\t\tsearchPrefix = \"\";\n\t\t\t} else if (rawPrefix.endsWith(\"/\")) {\n\t\t\t\t// If prefix ends with /, show contents of that directory\n\t\t\t\tif (rawPrefix.startsWith(\"~\") || expandedPrefix.startsWith(\"/\")) {\n\t\t\t\t\tsearchDir = expandedPrefix;\n\t\t\t\t} else {\n\t\t\t\t\tsearchDir = join(this.basePath, expandedPrefix);\n\t\t\t\t}\n\t\t\t\tsearchPrefix = \"\";\n\t\t\t} else {\n\t\t\t\t// Split into directory and file prefix\n\t\t\t\tconst dir = dirname(expandedPrefix);\n\t\t\t\tconst file = basename(expandedPrefix);\n\t\t\t\tif (rawPrefix.startsWith(\"~\") || expandedPrefix.startsWith(\"/\")) {\n\t\t\t\t\tsearchDir = dir;\n\t\t\t\t} else {\n\t\t\t\t\tsearchDir = join(this.basePath, dir);\n\t\t\t\t}\n\t\t\t\tsearchPrefix = file;\n\t\t\t}\n\n\t\t\tconst entries = readdirSync(searchDir, { withFileTypes: true });\n\t\t\tconst suggestions: AutocompleteItem[] = [];\n\n\t\t\tfor (const entry of entries) {\n\t\t\t\tif (!entry.name.toLowerCase().startsWith(searchPrefix.toLowerCase())) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Check if entry is a directory (or a symlink pointing to a directory)\n\t\t\t\tlet isDirectory = entry.isDirectory();\n\t\t\t\tif (!isDirectory && entry.isSymbolicLink()) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst fullPath = join(searchDir, entry.name);\n\t\t\t\t\t\tisDirectory = statSync(fullPath).isDirectory();\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// Broken symlink or permission error - treat as file\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tlet relativePath: string;\n\t\t\t\tconst name = entry.name;\n\t\t\t\tconst displayPrefix = rawPrefix;\n\n\t\t\t\tif (displayPrefix.endsWith(\"/\")) {\n\t\t\t\t\t// If prefix ends with /, append entry to the prefix\n\t\t\t\t\trelativePath = displayPrefix + name;\n\t\t\t\t} else if (displayPrefix.includes(\"/\") || displayPrefix.includes(\"\\\\\")) {\n\t\t\t\t\t// Preserve ~/ format for home directory paths\n\t\t\t\t\tif (displayPrefix.startsWith(\"~/\")) {\n\t\t\t\t\t\tconst homeRelativeDir = displayPrefix.slice(2); // Remove ~/\n\t\t\t\t\t\tconst dir = dirname(homeRelativeDir);\n\t\t\t\t\t\trelativePath = `~/${dir === \".\" ? name : join(dir, name)}`;\n\t\t\t\t\t} else if (displayPrefix.startsWith(\"/\")) {\n\t\t\t\t\t\t// Absolute path - construct properly\n\t\t\t\t\t\tconst dir = dirname(displayPrefix);\n\t\t\t\t\t\tif (dir === \"/\") {\n\t\t\t\t\t\t\trelativePath = `/${name}`;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trelativePath = `${dir}/${name}`;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\trelativePath = join(dirname(displayPrefix), name);\n\t\t\t\t\t\t// path.join normalizes away ./ prefix, preserve it\n\t\t\t\t\t\tif (displayPrefix.startsWith(\"./\") && !relativePath.startsWith(\"./\")) {\n\t\t\t\t\t\t\trelativePath = `./${relativePath}`;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// For standalone entries, preserve ~/ if original prefix was ~/\n\t\t\t\t\tif (displayPrefix.startsWith(\"~\")) {\n\t\t\t\t\t\trelativePath = `~/${name}`;\n\t\t\t\t\t} else {\n\t\t\t\t\t\trelativePath = name;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\trelativePath = toDisplayPath(relativePath);\n\t\t\t\tconst pathValue = isDirectory ? `${relativePath}/` : relativePath;\n\t\t\t\tconst value = buildCompletionValue(pathValue, {\n\t\t\t\t\tisDirectory,\n\t\t\t\t\tisAtPrefix,\n\t\t\t\t\tisQuotedPrefix,\n\t\t\t\t});\n\n\t\t\t\tsuggestions.push({\n\t\t\t\t\tvalue,\n\t\t\t\t\tlabel: name + (isDirectory ? \"/\" : \"\"),\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Sort directories first, then alphabetically\n\t\t\tsuggestions.sort((a, b) => {\n\t\t\t\tconst aIsDir = a.value.endsWith(\"/\");\n\t\t\t\tconst bIsDir = b.value.endsWith(\"/\");\n\t\t\t\tif (aIsDir && !bIsDir) return -1;\n\t\t\t\tif (!aIsDir && bIsDir) return 1;\n\t\t\t\treturn a.label.localeCompare(b.label);\n\t\t\t});\n\n\t\t\treturn suggestions;\n\t\t} catch (_e) {\n\t\t\t// Directory doesn't exist or not accessible\n\t\t\treturn [];\n\t\t}\n\t}\n\n\t// Score an entry against the query (higher = better match)\n\t// isDirectory adds bonus to prioritize folders\n\tprivate scoreEntry(filePath: string, query: string, isDirectory: boolean): number {\n\t\tconst fileName = basename(filePath);\n\t\tconst lowerFileName = fileName.toLowerCase();\n\t\tconst lowerQuery = query.toLowerCase();\n\n\t\tlet score = 0;\n\n\t\t// Exact filename match (highest)\n\t\tif (lowerFileName === lowerQuery) score = 100;\n\t\t// Filename starts with query\n\t\telse if (lowerFileName.startsWith(lowerQuery)) score = 80;\n\t\t// Substring match in filename\n\t\telse if (lowerFileName.includes(lowerQuery)) score = 50;\n\t\t// Substring match in full path\n\t\telse if (filePath.toLowerCase().includes(lowerQuery)) score = 30;\n\n\t\t// Directories get a bonus to appear first\n\t\tif (isDirectory && score > 0) score += 10;\n\n\t\treturn score;\n\t}\n\n\t// Fuzzy file search using fd (fast, respects .gitignore)\n\tprivate async getFuzzyFileSuggestions(\n\t\tquery: string,\n\t\toptions: { isQuotedPrefix: boolean; signal: AbortSignal },\n\t): Promise<AutocompleteItem[]> {\n\t\tif (!this.fdPath || options.signal.aborted) {\n\t\t\treturn [];\n\t\t}\n\n\t\ttry {\n\t\t\tconst scopedQuery = this.resolveScopedFuzzyQuery(query);\n\t\t\tconst fdBaseDir = scopedQuery?.baseDir ?? this.basePath;\n\t\t\tconst fdQuery = scopedQuery?.query ?? query;\n\t\t\tconst entries = await walkDirectoryWithFd(fdBaseDir, this.fdPath, fdQuery, 100, options.signal);\n\t\t\tif (options.signal.aborted) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\tconst scoredEntries = entries\n\t\t\t\t.map((entry) => ({\n\t\t\t\t\t...entry,\n\t\t\t\t\tscore: fdQuery ? this.scoreEntry(entry.path, fdQuery, entry.isDirectory) : 1,\n\t\t\t\t}))\n\t\t\t\t.filter((entry) => entry.score > 0);\n\n\t\t\tscoredEntries.sort((a, b) => b.score - a.score);\n\t\t\tconst topEntries = scoredEntries.slice(0, 20);\n\n\t\t\tconst suggestions: AutocompleteItem[] = [];\n\t\t\tfor (const { path: entryPath, isDirectory } of topEntries) {\n\t\t\t\tconst pathWithoutSlash = isDirectory ? entryPath.slice(0, -1) : entryPath;\n\t\t\t\tconst displayPath = scopedQuery\n\t\t\t\t\t? this.scopedPathForDisplay(scopedQuery.displayBase, pathWithoutSlash)\n\t\t\t\t\t: pathWithoutSlash;\n\t\t\t\tconst entryName = basename(pathWithoutSlash);\n\t\t\t\tconst completionPath = isDirectory ? `${displayPath}/` : displayPath;\n\t\t\t\tconst value = buildCompletionValue(completionPath, {\n\t\t\t\t\tisDirectory,\n\t\t\t\t\tisAtPrefix: true,\n\t\t\t\t\tisQuotedPrefix: options.isQuotedPrefix,\n\t\t\t\t});\n\n\t\t\t\tsuggestions.push({\n\t\t\t\t\tvalue,\n\t\t\t\t\tlabel: entryName + (isDirectory ? \"/\" : \"\"),\n\t\t\t\t\tdescription: displayPath,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn suggestions;\n\t\t} catch {\n\t\t\treturn [];\n\t\t}\n\t}\n\n\t// Check if we should trigger file completion (called on Tab key)\n\tshouldTriggerFileCompletion(lines: string[], cursorLine: number, cursorCol: number): boolean {\n\t\tconst currentLine = lines[cursorLine] || \"\";\n\t\tconst textBeforeCursor = currentLine.slice(0, cursorCol);\n\n\t\t// Don't trigger if we're typing a slash command at the start of the line\n\t\tif (textBeforeCursor.trim().startsWith(\"/\") && !textBeforeCursor.trim().includes(\" \"))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CAAC;YACvF,OAAO,KAAK,CAAC;QACd,CAAC;QAED,OAAO,IAAI,CAAC;IAAA,CACZ;CACD","sourcesContent":["import { spawn } from \"child_process\";\nimport { readdirSync, statSync } from \"fs\";\nimport { homedir } from \"os\";\nimport { basename, dirname, join } from \"path\";\nimport { fuzzyFilter } from \"./fuzzy.ts\";\n\nconst PATH_DELIMITERS = new Set([\" \", \"\\t\", '\"', \"'\", \"=\"]);\n\nfunction toDisplayPath(value: string): string {\n\treturn value.replace(/\\\\/g, \"/\");\n}\n\nfunction escapeRegex(value: string): string {\n\treturn value.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\n\nfunction buildFdPathQuery(query: string): string {\n\tconst normalized = toDisplayPath(query);\n\tif (!normalized.includes(\"/\")) {\n\t\treturn normalized;\n\t}\n\n\tconst hasTrailingSeparator = normalized.endsWith(\"/\");\n\tconst trimmed = normalized.replace(/^\\/+|\\/+$/g, \"\");\n\tif (!trimmed) {\n\t\treturn normalized;\n\t}\n\n\tconst separatorPattern = \"[\\\\\\\\/]\";\n\tconst segments = trimmed\n\t\t.split(\"/\")\n\t\t.filter(Boolean)\n\t\t.map((segment) => escapeRegex(segment));\n\tif (segments.length === 0) {\n\t\treturn normalized;\n\t}\n\n\tlet pattern = segments.join(separatorPattern);\n\tif (hasTrailingSeparator) {\n\t\tpattern += separatorPattern;\n\t}\n\treturn pattern;\n}\n\nfunction findLastDelimiter(text: string): number {\n\tfor (let i = text.length - 1; i >= 0; i -= 1) {\n\t\tif (PATH_DELIMITERS.has(text[i] ?? \"\")) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n}\n\nfunction findUnclosedQuoteStart(text: string): number | null {\n\tlet inQuotes = false;\n\tlet quoteStart = -1;\n\n\tfor (let i = 0; i < text.length; i += 1) {\n\t\tif (text[i] === '\"') {\n\t\t\tinQuotes = !inQuotes;\n\t\t\tif (inQuotes) {\n\t\t\t\tquoteStart = i;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn inQuotes ? quoteStart : null;\n}\n\nfunction isTokenStart(text: string, index: number): boolean {\n\treturn index === 0 || PATH_DELIMITERS.has(text[index - 1] ?? \"\");\n}\n\nfunction extractQuotedPrefix(text: string): string | null {\n\tconst quoteStart = findUnclosedQuoteStart(text);\n\tif (quoteStart === null) {\n\t\treturn null;\n\t}\n\n\tif (quoteStart > 0 && text[quoteStart - 1] === \"@\") {\n\t\tif (!isTokenStart(text, quoteStart - 1)) {\n\t\t\treturn null;\n\t\t}\n\t\treturn text.slice(quoteStart - 1);\n\t}\n\n\tif (!isTokenStart(text, quoteStart)) {\n\t\treturn null;\n\t}\n\n\treturn text.slice(quoteStart);\n}\n\nfunction parsePathPrefix(prefix: string): { rawPrefix: string; isAtPrefix: boolean; isQuotedPrefix: boolean } {\n\tif (prefix.startsWith('@\"')) {\n\t\treturn { rawPrefix: prefix.slice(2), isAtPrefix: true, isQuotedPrefix: true };\n\t}\n\tif (prefix.startsWith('\"')) {\n\t\treturn { rawPrefix: prefix.slice(1), isAtPrefix: false, isQuotedPrefix: true };\n\t}\n\tif (prefix.startsWith(\"@\")) {\n\t\treturn { rawPrefix: prefix.slice(1), isAtPrefix: true, isQuotedPrefix: false };\n\t}\n\treturn { rawPrefix: prefix, isAtPrefix: false, isQuotedPrefix: false };\n}\n\nfunction buildCompletionValue(\n\tpath: string,\n\toptions: { isDirectory: boolean; isAtPrefix: boolean; isQuotedPrefix: boolean },\n): string {\n\tconst needsQuotes = options.isQuotedPrefix || path.includes(\" \");\n\tconst prefix = options.isAtPrefix ? \"@\" : \"\";\n\n\tif (!needsQuotes) {\n\t\treturn `${prefix}${path}`;\n\t}\n\n\tconst openQuote = `${prefix}\"`;\n\tconst closeQuote = '\"';\n\treturn `${openQuote}${path}${closeQuote}`;\n}\n\n// Use fd to walk directory tree (fast, respects .gitignore)\nasync function walkDirectoryWithFd(\n\tbaseDir: string,\n\tfdPath: string,\n\tquery: string,\n\tmaxResults: number,\n\tsignal: AbortSignal,\n\tmaxDepth?: number,\n): Promise<Array<{ path: string; isDirectory: boolean }>> {\n\tconst args = [\n\t\t\"--base-directory\",\n\t\tbaseDir,\n\t\t\"--max-results\",\n\t\tString(maxResults),\n\t\t\"--type\",\n\t\t\"f\",\n\t\t\"--type\",\n\t\t\"d\",\n\t\t\"--follow\",\n\t\t\"--hidden\",\n\t\t\"--exclude\",\n\t\t\".git\",\n\t\t\"--exclude\",\n\t\t\".git/*\",\n\t\t\"--exclude\",\n\t\t\".git/**\",\n\t];\n\n\tif (maxDepth !== undefined) {\n\t\targs.push(\"--max-depth\", String(maxDepth));\n\t}\n\n\tif (toDisplayPath(query).includes(\"/\")) {\n\t\targs.push(\"--full-path\");\n\t}\n\n\tif (query) {\n\t\targs.push(buildFdPathQuery(query));\n\t}\n\n\treturn await new Promise((resolve) => {\n\t\tif (signal.aborted) {\n\t\t\tresolve([]);\n\t\t\treturn;\n\t\t}\n\n\t\tconst child = spawn(fdPath, args, {\n\t\t\tstdio: [\"ignore\", \"pipe\", \"pipe\"],\n\t\t});\n\t\tlet stdout = \"\";\n\t\tlet resolved = false;\n\n\t\tconst finish = (results: Array<{ path: string; isDirectory: boolean }>) => {\n\t\t\tif (resolved) return;\n\t\t\tresolved = true;\n\t\t\tsignal.removeEventListener(\"abort\", onAbort);\n\t\t\tresolve(results);\n\t\t};\n\n\t\tconst onAbort = () => {\n\t\t\tif (child.exitCode === null) {\n\t\t\t\tchild.kill(\"SIGKILL\");\n\t\t\t}\n\t\t};\n\n\t\tsignal.addEventListener(\"abort\", onAbort, { once: true });\n\t\tchild.stdout.setEncoding(\"utf-8\");\n\t\tchild.stdout.on(\"data\", (chunk: string) => {\n\t\t\tstdout += chunk;\n\t\t});\n\t\tchild.on(\"error\", () => {\n\t\t\tfinish([]);\n\t\t});\n\t\tchild.on(\"close\", (code) => {\n\t\t\tif (signal.aborted || code !== 0 || !stdout) {\n\t\t\t\tfinish([]);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst lines = stdout.trim().split(\"\\n\").filter(Boolean);\n\t\t\tconst results: Array<{ path: string; isDirectory: boolean }> = [];\n\n\t\t\tfor (const line of lines) {\n\t\t\t\tconst displayLine = toDisplayPath(line);\n\t\t\t\tconst hasTrailingSeparator = displayLine.endsWith(\"/\");\n\t\t\t\tconst normalizedPath = hasTrailingSeparator ? displayLine.slice(0, -1) : displayLine;\n\t\t\t\tif (normalizedPath === \".git\" || normalizedPath.startsWith(\".git/\") || normalizedPath.includes(\"/.git/\")) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tresults.push({\n\t\t\t\t\tpath: displayLine,\n\t\t\t\t\tisDirectory: hasTrailingSeparator,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tfinish(results);\n\t\t});\n\t});\n}\n\nexport interface AutocompleteItem {\n\tvalue: string;\n\tlabel: string;\n\tdescription?: string;\n}\n\ntype Awaitable<T> = T | Promise<T>;\n\nexport interface SlashCommand {\n\tname: string;\n\tdescription?: string;\n\targumentHint?: string;\n\t// Function to get argument completions for this command\n\t// Returns null if no argument completion is available\n\tgetArgumentCompletions?(argumentPrefix: string): Awaitable<AutocompleteItem[] | null>;\n}\n\nexport interface AutocompleteSuggestions {\n\titems: AutocompleteItem[];\n\tprefix: string; // What we're matching against (e.g., \"/\" or \"src/\")\n}\n\nexport interface AutocompleteProvider {\n\t/** Characters that should naturally trigger this provider at token boundaries. */\n\ttriggerCharacters?: string[];\n\n\t// Get autocomplete suggestions for current text/cursor position\n\t// Returns null if no suggestions available\n\tgetSuggestions(\n\t\tlines: string[],\n\t\tcursorLine: number,\n\t\tcursorCol: number,\n\t\toptions: { signal: AbortSignal; force?: boolean },\n\t): Promise<AutocompleteSuggestions | null>;\n\n\t// Apply the selected item\n\t// Returns the new text and cursor position\n\tapplyCompletion(\n\t\tlines: string[],\n\t\tcursorLine: number,\n\t\tcursorCol: number,\n\t\titem: AutocompleteItem,\n\t\tprefix: string,\n\t): {\n\t\tlines: string[];\n\t\tcursorLine: number;\n\t\tcursorCol: number;\n\t};\n\n\t// Check if file completion should trigger for explicit Tab completion\n\tshouldTriggerFileCompletion?(lines: string[], cursorLine: number, cursorCol: number): boolean;\n}\n\n// Combined provider that handles both slash commands and file paths\nexport class CombinedAutocompleteProvider implements AutocompleteProvider {\n\tprivate commands: (SlashCommand | AutocompleteItem)[];\n\tprivate basePath: string;\n\tprivate fdPath: string | null;\n\n\tconstructor(commands: (SlashCommand | AutocompleteItem)[] = [], basePath: string, fdPath: string | null = null) {\n\t\tthis.commands = commands;\n\t\tthis.basePath = basePath;\n\t\tthis.fdPath = fdPath;\n\t}\n\n\tasync getSuggestions(\n\t\tlines: string[],\n\t\tcursorLine: number,\n\t\tcursorCol: number,\n\t\toptions: { signal: AbortSignal; force?: boolean },\n\t): Promise<AutocompleteSuggestions | null> {\n\t\tconst currentLine = lines[cursorLine] || \"\";\n\t\tconst textBeforeCursor = currentLine.slice(0, cursorCol);\n\n\t\tconst atPrefix = this.extractAtPrefix(textBeforeCursor);\n\t\tif (atPrefix) {\n\t\t\tconst { rawPrefix, isQuotedPrefix } = parsePathPrefix(atPrefix);\n\t\t\tconst suggestions = await this.getFuzzyFileSuggestions(rawPrefix, {\n\t\t\t\tisQuotedPrefix,\n\t\t\t\tsignal: options.signal,\n\t\t\t});\n\t\t\tif (suggestions.length === 0) return null;\n\n\t\t\treturn {\n\t\t\t\titems: suggestions,\n\t\t\t\tprefix: atPrefix,\n\t\t\t};\n\t\t}\n\n\t\tif (!options.force && textBeforeCursor.startsWith(\"/\")) {\n\t\t\tconst spaceIndex = textBeforeCursor.indexOf(\" \");\n\n\t\t\tif (spaceIndex === -1) {\n\t\t\t\tconst prefix = textBeforeCursor.slice(1);\n\t\t\t\tconst commandItems = this.commands.map((cmd) => {\n\t\t\t\t\tconst name = \"name\" in cmd ? cmd.name : cmd.value;\n\t\t\t\t\tconst hint = \"argumentHint\" in cmd && cmd.argumentHint ? cmd.argumentHint : undefined;\n\t\t\t\t\tconst desc = cmd.description ?? \"\";\n\t\t\t\t\tconst fullDesc = hint ? (desc ? `${hint} — ${desc}` : hint) : desc;\n\t\t\t\t\treturn {\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tlabel: name,\n\t\t\t\t\t\tdescription: fullDesc || undefined,\n\t\t\t\t\t};\n\t\t\t\t});\n\n\t\t\t\tconst filtered = fuzzyFilter(commandItems, prefix, (item) => item.name).map((item) => ({\n\t\t\t\t\tvalue: item.name,\n\t\t\t\t\tlabel: item.label,\n\t\t\t\t\t...(item.description && { description: item.description }),\n\t\t\t\t}));\n\n\t\t\t\tif (filtered.length === 0) return null;\n\n\t\t\t\treturn {\n\t\t\t\t\titems: filtered,\n\t\t\t\t\tprefix: textBeforeCursor,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst commandName = textBeforeCursor.slice(1, spaceIndex);\n\t\t\tconst argumentText = textBeforeCursor.slice(spaceIndex + 1);\n\n\t\t\tconst command = this.commands.find((cmd) => {\n\t\t\t\tconst name = \"name\" in cmd ? cmd.name : cmd.value;\n\t\t\t\treturn name === commandName;\n\t\t\t});\n\t\t\tif (!command || !(\"getArgumentCompletions\" in command) || !command.getArgumentCompletions) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst argumentSuggestions = await command.getArgumentCompletions(argumentText);\n\t\t\tif (!Array.isArray(argumentSuggestions) || argumentSuggestions.length === 0) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\titems: argumentSuggestions,\n\t\t\t\tprefix: argumentText,\n\t\t\t};\n\t\t}\n\n\t\tconst pathMatch = this.extractPathPrefix(textBeforeCursor, options.force ?? false);\n\t\tif (pathMatch === null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst suggestions = this.getFileSuggestions(pathMatch);\n\t\tif (suggestions.length === 0) return null;\n\n\t\treturn {\n\t\t\titems: suggestions,\n\t\t\tprefix: pathMatch,\n\t\t};\n\t}\n\n\tapplyCompletion(\n\t\tlines: string[],\n\t\tcursorLine: number,\n\t\tcursorCol: number,\n\t\titem: AutocompleteItem,\n\t\tprefix: string,\n\t): { lines: string[]; cursorLine: number; cursorCol: number } {\n\t\tconst currentLine = lines[cursorLine] || \"\";\n\t\tconst beforePrefix = currentLine.slice(0, cursorCol - prefix.length);\n\t\tconst afterCursor = currentLine.slice(cursorCol);\n\t\tconst isQuotedPrefix = prefix.startsWith('\"') || prefix.startsWith('@\"');\n\t\tconst hasLeadingQuoteAfterCursor = afterCursor.startsWith('\"');\n\t\tconst hasTrailingQuoteInItem = item.value.endsWith('\"');\n\t\tconst adjustedAfterCursor =\n\t\t\tisQuotedPrefix && hasTrailingQuoteInItem && hasLeadingQuoteAfterCursor ? afterCursor.slice(1) : afterCursor;\n\n\t\t// Check if we're completing a slash command (prefix starts with \"/\" but NOT a file path)\n\t\t// Slash commands are at the start of the line and don't contain path separators after the first /\n\t\tconst isSlashCommand = prefix.startsWith(\"/\") && beforePrefix.trim() === \"\" && !prefix.slice(1).includes(\"/\");\n\t\tif (isSlashCommand) {\n\t\t\t// This is a command name completion\n\t\t\tconst newLine = `${beforePrefix}/${item.value} ${adjustedAfterCursor}`;\n\t\t\tconst newLines = [...lines];\n\t\t\tnewLines[cursorLine] = newLine;\n\n\t\t\treturn {\n\t\t\t\tlines: newLines,\n\t\t\t\tcursorLine,\n\t\t\t\tcursorCol: beforePrefix.length + item.value.length + 2, // +2 for \"/\" and space\n\t\t\t};\n\t\t}\n\n\t\t// Check if we're completing a file attachment (prefix starts with \"@\")\n\t\tif (prefix.startsWith(\"@\")) {\n\t\t\t// This is a file attachment completion\n\t\t\t// Don't add space after directories so user can continue autocompleting\n\t\t\tconst isDirectory = item.label.endsWith(\"/\");\n\t\t\tconst suffix = isDirectory ? \"\" : \" \";\n\t\t\tconst newLine = `${beforePrefix + item.value}${suffix}${adjustedAfterCursor}`;\n\t\t\tconst newLines = [...lines];\n\t\t\tnewLines[cursorLine] = newLine;\n\n\t\t\tconst hasTrailingQuote = item.value.endsWith('\"');\n\t\t\tconst cursorOffset = isDirectory && hasTrailingQuote ? item.value.length - 1 : item.value.length;\n\n\t\t\treturn {\n\t\t\t\tlines: newLines,\n\t\t\t\tcursorLine,\n\t\t\t\tcursorCol: beforePrefix.length + cursorOffset + suffix.length,\n\t\t\t};\n\t\t}\n\n\t\t// Check if we're in a slash command context (beforePrefix contains \"/command \")\n\t\tconst textBeforeCursor = currentLine.slice(0, cursorCol);\n\t\tif (textBeforeCursor.includes(\"/\") && textBeforeCursor.includes(\" \")) {\n\t\t\t// This is likely a command argument completion\n\t\t\tconst newLine = beforePrefix + item.value + adjustedAfterCursor;\n\t\t\tconst newLines = [...lines];\n\t\t\tnewLines[cursorLine] = newLine;\n\n\t\t\tconst isDirectory = item.label.endsWith(\"/\");\n\t\t\tconst hasTrailingQuote = item.value.endsWith('\"');\n\t\t\tconst cursorOffset = isDirectory && hasTrailingQuote ? item.value.length - 1 : item.value.length;\n\n\t\t\treturn {\n\t\t\t\tlines: newLines,\n\t\t\t\tcursorLine,\n\t\t\t\tcursorCol: beforePrefix.length + cursorOffset,\n\t\t\t};\n\t\t}\n\n\t\t// For file paths, complete the path\n\t\tconst newLine = beforePrefix + item.value + adjustedAfterCursor;\n\t\tconst newLines = [...lines];\n\t\tnewLines[cursorLine] = newLine;\n\n\t\tconst isDirectory = item.label.endsWith(\"/\");\n\t\tconst hasTrailingQuote = item.value.endsWith('\"');\n\t\tconst cursorOffset = isDirectory && hasTrailingQuote ? item.value.length - 1 : item.value.length;\n\n\t\treturn {\n\t\t\tlines: newLines,\n\t\t\tcursorLine,\n\t\t\tcursorCol: beforePrefix.length + cursorOffset,\n\t\t};\n\t}\n\n\t// Extract @ prefix for fuzzy file suggestions\n\tprivate extractAtPrefix(text: string): string | null {\n\t\tconst quotedPrefix = extractQuotedPrefix(text);\n\t\tif (quotedPrefix?.startsWith('@\"')) {\n\t\t\treturn quotedPrefix;\n\t\t}\n\n\t\tconst lastDelimiterIndex = findLastDelimiter(text);\n\t\tconst tokenStart = lastDelimiterIndex === -1 ? 0 : lastDelimiterIndex + 1;\n\n\t\tif (text[tokenStart] === \"@\") {\n\t\t\treturn text.slice(tokenStart);\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t// Extract a path-like prefix from the text before cursor\n\tprivate extractPathPrefix(text: string, forceExtract: boolean = false): string | null {\n\t\tconst quotedPrefix = extractQuotedPrefix(text);\n\t\tif (quotedPrefix) {\n\t\t\treturn quotedPrefix;\n\t\t}\n\n\t\tconst lastDelimiterIndex = findLastDelimiter(text);\n\t\tconst pathPrefix = lastDelimiterIndex === -1 ? text : text.slice(lastDelimiterIndex + 1);\n\n\t\t// For forced extraction (Tab key), always return something\n\t\tif (forceExtract) {\n\t\t\treturn pathPrefix;\n\t\t}\n\n\t\t// For natural triggers, return if it looks like a path, ends with /, starts with ~/, .\n\t\t// Only return empty string if the text looks like it's starting a path context\n\t\tif (pathPrefix.includes(\"/\") || pathPrefix.startsWith(\".\") || pathPrefix.startsWith(\"~/\")) {\n\t\t\treturn pathPrefix;\n\t\t}\n\n\t\t// Return empty string only after a space (not for completely empty text)\n\t\t// Empty text should not trigger file suggestions - that's for forced Tab completion\n\t\tif (pathPrefix === \"\" && text.endsWith(\" \")) {\n\t\t\treturn pathPrefix;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t// Expand home directory (~/) to actual home path\n\tprivate expandHomePath(path: string): string {\n\t\tif (path.startsWith(\"~/\")) {\n\t\t\tconst expandedPath = join(homedir(), path.slice(2));\n\t\t\t// Preserve trailing slash if original path had one\n\t\t\treturn path.endsWith(\"/\") && !expandedPath.endsWith(\"/\") ? `${expandedPath}/` : expandedPath;\n\t\t} else if (path === \"~\") {\n\t\t\treturn homedir();\n\t\t}\n\t\treturn path;\n\t}\n\n\tprivate resolveScopedFuzzyQuery(rawQuery: string): { baseDir: string; query: string; displayBase: string } | null {\n\t\tconst normalizedQuery = toDisplayPath(rawQuery);\n\t\tconst slashIndex = normalizedQuery.lastIndexOf(\"/\");\n\t\tif (slashIndex === -1) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst displayBase = normalizedQuery.slice(0, slashIndex + 1);\n\t\tconst query = normalizedQuery.slice(slashIndex + 1);\n\n\t\tlet baseDir: string;\n\t\tif (displayBase.startsWith(\"~/\")) {\n\t\t\tbaseDir = this.expandHomePath(displayBase);\n\t\t} else if (displayBase.startsWith(\"/\")) {\n\t\t\tbaseDir = displayBase;\n\t\t} else {\n\t\t\tbaseDir = join(this.basePath, displayBase);\n\t\t}\n\n\t\ttry {\n\t\t\tif (!statSync(baseDir).isDirectory()) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} catch {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn { baseDir, query, displayBase };\n\t}\n\n\tprivate scopedPathForDisplay(displayBase: string, relativePath: string): string {\n\t\tconst normalizedRelativePath = toDisplayPath(relativePath);\n\t\tif (displayBase === \"/\") {\n\t\t\treturn `/${normalizedRelativePath}`;\n\t\t}\n\t\treturn `${toDisplayPath(displayBase)}${normalizedRelativePath}`;\n\t}\n\n\t// Get file/directory suggestions for a given path prefix\n\tprivate getFileSuggestions(prefix: string): AutocompleteItem[] {\n\t\ttry {\n\t\t\tlet searchDir: string;\n\t\t\tlet searchPrefix: string;\n\t\t\tconst { rawPrefix, isAtPrefix, isQuotedPrefix } = parsePathPrefix(prefix);\n\t\t\tlet expandedPrefix = rawPrefix;\n\n\t\t\t// Handle home directory expansion\n\t\t\tif (expandedPrefix.startsWith(\"~\")) {\n\t\t\t\texpandedPrefix = this.expandHomePath(expandedPrefix);\n\t\t\t}\n\n\t\t\tconst isRootPrefix =\n\t\t\t\trawPrefix === \"\" ||\n\t\t\t\trawPrefix === \"./\" ||\n\t\t\t\trawPrefix === \"../\" ||\n\t\t\t\trawPrefix === \"~\" ||\n\t\t\t\trawPrefix === \"~/\" ||\n\t\t\t\trawPrefix === \"/\" ||\n\t\t\t\t(isAtPrefix && rawPrefix === \"\");\n\n\t\t\tif (isRootPrefix) {\n\t\t\t\t// Complete from specified position\n\t\t\t\tif (rawPrefix.startsWith(\"~\") || expandedPrefix.startsWith(\"/\")) {\n\t\t\t\t\tsearchDir = expandedPrefix;\n\t\t\t\t} else {\n\t\t\t\t\tsearchDir = join(this.basePath, expandedPrefix);\n\t\t\t\t}\n\t\t\t\tsearchPrefix = \"\";\n\t\t\t} else if (rawPrefix.endsWith(\"/\")) {\n\t\t\t\t// If prefix ends with /, show contents of that directory\n\t\t\t\tif (rawPrefix.startsWith(\"~\") || expandedPrefix.startsWith(\"/\")) {\n\t\t\t\t\tsearchDir = expandedPrefix;\n\t\t\t\t} else {\n\t\t\t\t\tsearchDir = join(this.basePath, expandedPrefix);\n\t\t\t\t}\n\t\t\t\tsearchPrefix = \"\";\n\t\t\t} else {\n\t\t\t\t// Split into directory and file prefix\n\t\t\t\tconst dir = dirname(expandedPrefix);\n\t\t\t\tconst file = basename(expandedPrefix);\n\t\t\t\tif (rawPrefix.startsWith(\"~\") || expandedPrefix.startsWith(\"/\")) {\n\t\t\t\t\tsearchDir = dir;\n\t\t\t\t} else {\n\t\t\t\t\tsearchDir = join(this.basePath, dir);\n\t\t\t\t}\n\t\t\t\tsearchPrefix = file;\n\t\t\t}\n\n\t\t\tconst entries = readdirSync(searchDir, { withFileTypes: true });\n\t\t\tconst suggestions: AutocompleteItem[] = [];\n\n\t\t\tfor (const entry of entries) {\n\t\t\t\tif (!entry.name.toLowerCase().startsWith(searchPrefix.toLowerCase())) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Check if entry is a directory (or a symlink pointing to a directory)\n\t\t\t\tlet isDirectory = entry.isDirectory();\n\t\t\t\tif (!isDirectory && entry.isSymbolicLink()) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst fullPath = join(searchDir, entry.name);\n\t\t\t\t\t\tisDirectory = statSync(fullPath).isDirectory();\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// Broken symlink or permission error - treat as file\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tlet relativePath: string;\n\t\t\t\tconst name = entry.name;\n\t\t\t\tconst displayPrefix = rawPrefix;\n\n\t\t\t\tif (displayPrefix.endsWith(\"/\")) {\n\t\t\t\t\t// If prefix ends with /, append entry to the prefix\n\t\t\t\t\trelativePath = displayPrefix + name;\n\t\t\t\t} else if (displayPrefix.includes(\"/\") || displayPrefix.includes(\"\\\\\")) {\n\t\t\t\t\t// Preserve ~/ format for home directory paths\n\t\t\t\t\tif (displayPrefix.startsWith(\"~/\")) {\n\t\t\t\t\t\tconst homeRelativeDir = displayPrefix.slice(2); // Remove ~/\n\t\t\t\t\t\tconst dir = dirname(homeRelativeDir);\n\t\t\t\t\t\trelativePath = `~/${dir === \".\" ? name : join(dir, name)}`;\n\t\t\t\t\t} else if (displayPrefix.startsWith(\"/\")) {\n\t\t\t\t\t\t// Absolute path - construct properly\n\t\t\t\t\t\tconst dir = dirname(displayPrefix);\n\t\t\t\t\t\tif (dir === \"/\") {\n\t\t\t\t\t\t\trelativePath = `/${name}`;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trelativePath = `${dir}/${name}`;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\trelativePath = join(dirname(displayPrefix), name);\n\t\t\t\t\t\t// path.join normalizes away ./ prefix, preserve it\n\t\t\t\t\t\tif (displayPrefix.startsWith(\"./\") && !relativePath.startsWith(\"./\")) {\n\t\t\t\t\t\t\trelativePath = `./${relativePath}`;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// For standalone entries, preserve ~/ if original prefix was ~/\n\t\t\t\t\tif (displayPrefix.startsWith(\"~\")) {\n\t\t\t\t\t\trelativePath = `~/${name}`;\n\t\t\t\t\t} else {\n\t\t\t\t\t\trelativePath = name;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\trelativePath = toDisplayPath(relativePath);\n\t\t\t\tconst pathValue = isDirectory ? `${relativePath}/` : relativePath;\n\t\t\t\tconst value = buildCompletionValue(pathValue, {\n\t\t\t\t\tisDirectory,\n\t\t\t\t\tisAtPrefix,\n\t\t\t\t\tisQuotedPrefix,\n\t\t\t\t});\n\n\t\t\t\tsuggestions.push({\n\t\t\t\t\tvalue,\n\t\t\t\t\tlabel: name + (isDirectory ? \"/\" : \"\"),\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Sort directories first, then alphabetically\n\t\t\tsuggestions.sort((a, b) => {\n\t\t\t\tconst aIsDir = a.value.endsWith(\"/\");\n\t\t\t\tconst bIsDir = b.value.endsWith(\"/\");\n\t\t\t\tif (aIsDir && !bIsDir) return -1;\n\t\t\t\tif (!aIsDir && bIsDir) return 1;\n\t\t\t\treturn a.label.localeCompare(b.label);\n\t\t\t});\n\n\t\t\treturn suggestions;\n\t\t} catch (_e) {\n\t\t\t// Directory doesn't exist or not accessible\n\t\t\treturn [];\n\t\t}\n\t}\n\n\t// Score an entry against the query (higher = better match)\n\t// isDirectory adds bonus to prioritize folders\n\tprivate scoreEntry(filePath: string, query: string, isDirectory: boolean): number {\n\t\tconst fileName = basename(filePath);\n\t\tconst lowerFileName = fileName.toLowerCase();\n\t\tconst lowerQuery = query.toLowerCase();\n\n\t\tlet score = 0;\n\n\t\t// Exact filename match (highest)\n\t\tif (lowerFileName === lowerQuery) score = 100;\n\t\t// Filename starts with query\n\t\telse if (lowerFileName.startsWith(lowerQuery)) score = 80;\n\t\t// Substring match in filename\n\t\telse if (lowerFileName.includes(lowerQuery)) score = 50;\n\t\t// Substring match in full path\n\t\telse if (filePath.toLowerCase().includes(lowerQuery)) score = 30;\n\n\t\t// Directories get a bonus to appear first\n\t\tif (isDirectory && score > 0) score += 10;\n\n\t\treturn score;\n\t}\n\n\tprivate async getBaseDirSuggestions(\n\t\tbaseDir: string,\n\t\tquery: string,\n\t\tsignal: AbortSignal,\n\t): Promise<Array<{ path: string; isDirectory: boolean }>> {\n\t\tif (!this.fdPath || signal.aborted) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn await walkDirectoryWithFd(baseDir, this.fdPath, query, 100, signal, 1);\n\t}\n\n\t// Fuzzy file search using fd (fast, respects .gitignore)\n\tprivate async getFuzzyFileSuggestions(\n\t\tquery: string,\n\t\toptions: { isQuotedPrefix: boolean; signal: AbortSignal },\n\t): Promise<AutocompleteItem[]> {\n\t\tif (!this.fdPath || options.signal.aborted) {\n\t\t\treturn [];\n\t\t}\n\n\t\ttry {\n\t\t\tconst scopedQuery = this.resolveScopedFuzzyQuery(query);\n\t\t\tconst fdBaseDir = scopedQuery?.baseDir ?? this.basePath;\n\t\t\tconst fdQuery = scopedQuery?.query ?? query;\n\t\t\tconst baseDirEntries = await this.getBaseDirSuggestions(fdBaseDir, fdQuery, options.signal);\n\t\t\tconst recursiveEntries = await walkDirectoryWithFd(fdBaseDir, this.fdPath, fdQuery, 100, options.signal);\n\t\t\tconst seenPaths = new Set(baseDirEntries.map((entry) => entry.path));\n\t\t\tconst entries = [\n\t\t\t\t...baseDirEntries,\n\t\t\t\t...recursiveEntries.filter((entry) => {\n\t\t\t\t\tif (seenPaths.has(entry.path)) return false;\n\t\t\t\t\tseenPaths.add(entry.path);\n\t\t\t\t\treturn true;\n\t\t\t\t}),\n\t\t\t];\n\t\t\tif (options.signal.aborted) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\tconst scoredEntries = entries\n\t\t\t\t.map((entry) => ({\n\t\t\t\t\t...entry,\n\t\t\t\t\tscore: fdQuery ? this.scoreEntry(entry.path, fdQuery, entry.isDirectory) : 1,\n\t\t\t\t}))\n\t\t\t\t.filter((entry) => entry.score > 0);\n\n\t\t\tscoredEntries.sort((a, b) => {\n\t\t\t\tconst scoreDiff = b.score - a.score;\n\t\t\t\tif (scoreDiff !== 0) return scoreDiff;\n\n\t\t\t\tconst aDepth = toDisplayPath(a.path).split(\"/\").filter(Boolean).length;\n\t\t\t\tconst bDepth = toDisplayPath(b.path).split(\"/\").filter(Boolean).length;\n\t\t\t\tconst depthDiff = aDepth - bDepth;\n\t\t\t\tif (depthDiff !== 0) return depthDiff;\n\n\t\t\t\tconst lengthDiff = a.path.length - b.path.length;\n\t\t\t\tif (lengthDiff !== 0) return lengthDiff;\n\n\t\t\t\treturn a.path.localeCompare(b.path);\n\t\t\t});\n\t\t\tconst topEntries = scoredEntries.slice(0, 20);\n\n\t\t\tconst suggestions: AutocompleteItem[] = [];\n\t\t\tfor (const { path: entryPath, isDirectory } of topEntries) {\n\t\t\t\tconst pathWithoutSlash = isDirectory ? entryPath.slice(0, -1) : entryPath;\n\t\t\t\tconst displayPath = scopedQuery\n\t\t\t\t\t? this.scopedPathForDisplay(scopedQuery.displayBase, pathWithoutSlash)\n\t\t\t\t\t: pathWithoutSlash;\n\t\t\t\tconst entryName = basename(pathWithoutSlash);\n\t\t\t\tconst completionPath = isDirectory ? `${displayPath}/` : displayPath;\n\t\t\t\tconst value = buildCompletionValue(completionPath, {\n\t\t\t\t\tisDirectory,\n\t\t\t\t\tisAtPrefix: true,\n\t\t\t\t\tisQuotedPrefix: options.isQuotedPrefix,\n\t\t\t\t});\n\n\t\t\t\tsuggestions.push({\n\t\t\t\t\tvalue,\n\t\t\t\t\tlabel: entryName + (isDirectory ? \"/\" : \"\"),\n\t\t\t\t\tdescription: displayPath,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn suggestions;\n\t\t} catch {\n\t\t\treturn [];\n\t\t}\n\t}\n\n\t// Check if we should trigger file completion (called on Tab key)\n\tshouldTriggerFileCompletion(lines: string[], cursorLine: number, cursorCol: number): boolean {\n\t\tconst currentLine = lines[cursorLine] || \"\";\n\t\tconst textBeforeCursor = currentLine.slice(0, cursorCol);\n\n\t\t// Don't trigger if we're typing a slash command at the start of the line\n\t\tif (textBeforeCursor.trim().startsWith(\"/\") && !textBeforeCursor.trim().includes(\" \")) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"markdown.d.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IAED,UAAU,IAAI,IAAI,CAIjB;IAED,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CA4F9B;IAED;;;;;OAKG;IACH,OAAO,CAAC,iBAAiB;IA6BzB,OAAO,CAAC,qBAAqB;IAkC7B,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,4BAA4B;IAOpC,OAAO,CAAC,WAAW;IAoLnB,OAAO,CAAC,kBAAkB;IA6G1B,OAAO,CAAC,oBAAoB;IAK5B,OAAO,CAAC,sBAAsB;IAK9B;;OAEG;IACH,OAAO,CAAC,UAAU;IAoDlB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAY3B;;;;;OAKG;IACH,OAAO,CAAC,YAAY;IAIpB;;;OAGG;IACH,OAAO,CAAC,WAAW;CA6KnB","sourcesContent":["import { Marked, type Token, Tokenizer, type TokenizerExtension, type Tokens } from \"marked\";\nimport { renderLatex } from \"../latex.ts\";\nimport { getCapabilities, hyperlink, isImageLine } from \"../terminal-image.ts\";\nimport type { Component } from \"../tui.ts\";\nimport { applyBackgroundToLine, visibleWidth, wrapTextWithAnsi } from \"../utils.ts\";\n\nconst STRICT_STRIKETHROUGH_REGEX = /^(~~)(?=[^\\s~])((?:\\\\.|[^\\\\])*?(?:\\\\.|[^\\s~\\\\]))\\1(?=[^~]|$)/;\n\nclass StrictStrikethroughTokenizer extends Tokenizer {\n\toverride del(src: string): Tokens.Del | undefined {\n\t\tconst match = STRICT_STRIKETHROUGH_REGEX.exec(src);\n\t\tif (!match) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst text = match[2];\n\t\treturn {\n\t\t\ttype: \"del\",\n\t\t\traw: match[0],\n\t\t\ttext,\n\t\t\ttokens: this.lexer.inlineTokens(text),\n\t\t};\n\t}\n}\n\ninterface LatexToken extends Tokens.Generic {\n\ttype: \"latex\" | \"latexBlock\";\n\ttext: string;\n\tpending?: boolean;\n}\n\nfunction isEscaped(source: string, index: number): boolean {\n\tlet backslashes = 0;\n\tfor (let position = index - 1; position >= 0 && source[position] === \"\\\\\"; position--) {\n\t\tbackslashes++;\n\t}\n\treturn backslashes % 2 === 1;\n}\n\nfunction findClosingDelimiter(source: string, closing: string, start: number): number {\n\tlet index = source.indexOf(closing, start);\n\twhile (index >= 0 && isEscaped(source, index)) {\n\t\tindex = source.indexOf(closing, index + closing.length);\n\t}\n\treturn index;\n}\n\nfunction looksLikePendingDollarMath(source: string): boolean {\n\treturn /\\\\[A-Za-z]+|[_^=+*/<>()[\\]|±≤≥≠≈∈→⇒∞∫∑√-]/.test(source);\n}\n\nfunction tokenizeInlineLatex(source: string): LatexToken | undefined {\n\tlet opening = \"\";\n\tlet closing = \"\";\n\tif (source.startsWith(\"$$\")) {\n\t\topening = \"$$\";\n\t\tclosing = \"$$\";\n\t} else if (source.startsWith(\"\\\\(\")) {\n\t\topening = \"\\\\(\";\n\t\tclosing = \"\\\\)\";\n\t} else if (source.startsWith(\"\\\\[\")) {\n\t\topening = \"\\\\[\";\n\t\tclosing = \"\\\\]\";\n\t} else if (source.startsWith(\"$\") && !/^\\$\\s/.test(source)) {\n\t\topening = \"$\";\n\t\tclosing = \"$\";\n\t} else {\n\t\treturn undefined;\n\t}\n\n\tconst closingIndex = findClosingDelimiter(source, closing, opening.length);\n\tif (\n\t\tclosingIndex >= 0 &&\n\t\topening === \"$\" &&\n\t\t(/\\s$/.test(source.slice(opening.length, closingIndex)) ||\n\t\t\t/^\\d/.test(source.slice(closingIndex + 1)) ||\n\t\t\t(/^[A-Z_][A-Z0-9_]*(?:[^A-Za-z0-9_\\s])?$/.test(source.slice(opening.length, closingIndex)) &&\n\t\t\t\t/^[A-Za-z_][A-Za-z0-9_]*/.test(source.slice(closingIndex + 1))) ||\n\t\t\tsource.slice(opening.length, closingIndex).includes(\"`\"))\n\t) {\n\t\treturn undefined;\n\t}\n\n\tif (closingIndex < 0) {\n\t\tconst pendingSource = source.slice(opening.length);\n\t\tif (opening.startsWith(\"\\\\\") || looksLikePendingDollarMath(pendingSource)) {\n\t\t\treturn { type: \"latex\", raw: source, text: pendingSource, pending: true };\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tconst text = source.slice(opening.length, closingIndex);\n\tif (!text || text.includes(\"\\n\")) {\n\t\treturn undefined;\n\t}\n\n\tconst raw = source.slice(0, closingIndex + closing.length);\n\treturn { type: \"latex\", raw, text };\n}\n\nfunction tokenizeBlockLatex(source: string): LatexToken | undefined {\n\tconst dollarMatch = /^ {0,3}\\$\\$[ \\t]*(?:\\n)?([\\s\\S]*?)\\$\\$[ \\t]*(?:\\n|$)/.exec(source);\n\tif (dollarMatch?.[1]) {\n\t\treturn { type: \"latexBlock\", raw: dollarMatch[0], text: dollarMatch[1].trim() };\n\t}\n\n\tconst bracketMatch = /^ {0,3}\\\\\\[[ \\t]*(?:\\n)?([\\s\\S]*?)\\\\\\][ \\t]*(?:\\n|$)/.exec(source);\n\tif (bracketMatch?.[1]) {\n\t\treturn { type: \"latexBlock\", raw: bracketMatch[0], text: bracketMatch[1].trim() };\n\t}\n\n\tconst pendingBracket = /^ {0,3}\\\\\\[[ \\t]*(?:\\n)?([\\s\\S]*)$/.exec(source);\n\tif (pendingBracket) {\n\t\treturn { type: \"latexBlock\", raw: pendingBracket[0], text: pendingBracket[1], pending: true };\n\t}\n\tconst pendingDollar = /^ {0,3}\\$\\$[ \\t]*(?:\\n)?([\\s\\S]*)$/.exec(source);\n\tif (pendingDollar?.[1] && looksLikePendingDollarMath(pendingDollar[1])) {\n\t\treturn { type: \"latexBlock\", raw: pendingDollar[0], text: pendingDollar[1], pending: true };\n\t}\n\treturn undefined;\n}\n\nconst LATEX_MARKDOWN_EXTENSIONS: readonly TokenizerExtension[] = [\n\t{\n\t\tname: \"latexBlock\",\n\t\tlevel: \"block\",\n\t\tstart(source) {\n\t\t\tconst match = /(?:^|\\n) {0,3}(?:\\$\\$|\\\\\\[)/.exec(source);\n\t\t\treturn match ? match.index + (match[0].startsWith(\"\\n\") ? 1 : 0) : undefined;\n\t\t},\n\t\ttokenizer: tokenizeBlockLatex,\n\t},\n\t{\n\t\tname: \"latex\",\n\t\tlevel: \"inline\",\n\t\tstart(source) {\n\t\t\tconst indices = [source.indexOf(\"$\"), source.indexOf(\"\\\\(\"), source.indexOf(\"\\\\[\")].filter(\n\t\t\t\t(index) => index >= 0,\n\t\t\t);\n\t\t\treturn indices.length > 0 ? Math.min(...indices) : undefined;\n\t\t},\n\t\ttokenizer: tokenizeInlineLatex,\n\t},\n];\n\nfunction trimPartialClosingFences(tokens: readonly Token[]): void {\n\tconst token = tokens[tokens.length - 1];\n\tif (token?.type === \"list\") {\n\t\ttrimPartialClosingFences(token.items[token.items.length - 1]?.tokens ?? []);\n\t\treturn;\n\t}\n\tif (token?.type === \"blockquote\") {\n\t\ttrimPartialClosingFences(token.tokens ?? []);\n\t\treturn;\n\t}\n\tif (token?.type !== \"code\") {\n\t\treturn;\n\t}\n\n\t// Trim streamed partial closing fences so code blocks do not shrink/flicker\n\t// when the final fence character arrives. See https://github.com/earendil-works/pi/issues/5825.\n\tconst marker = /^(`{3,}|~{3,})/.exec(token.raw)?.[1];\n\tconst lastLine = token.raw.split(\"\\n\").pop();\n\tif (!marker || !lastLine || lastLine.length >= marker.length || lastLine !== marker[0]?.repeat(lastLine.length)) {\n\t\treturn;\n\t}\n\n\ttoken.text = token.text.slice(0, -lastLine.length).replace(/\\n$/, \"\");\n}\n\nconst markdownParser = new Marked();\nmarkdownParser.setOptions({\n\ttokenizer: new StrictStrikethroughTokenizer(),\n});\nmarkdownParser.use({ extensions: [...LATEX_MARKDOWN_EXTENSIONS] });\n\n/**\n * Default text styling for markdown content.\n * Applied to all text unless overridden by markdown formatting.\n */\nexport interface DefaultTextStyle {\n\t/** Foreground color function */\n\tcolor?: (text: string) => string;\n\t/** Background color function */\n\tbgColor?: (text: string) => string;\n\t/** Bold text */\n\tbold?: boolean;\n\t/** Italic text */\n\titalic?: boolean;\n\t/** Strikethrough text */\n\tstrikethrough?: boolean;\n\t/** Underline text */\n\tunderline?: boolean;\n}\n\n/**\n * Theme functions for markdown elements.\n * Each function takes text and returns styled text with ANSI codes.\n */\nexport interface MarkdownTheme {\n\theading: (text: string) => string;\n\tlink: (text: string) => string;\n\tlinkUrl: (text: string) => string;\n\tcode: (text: string) => string;\n\tcodeBlock: (text: string) => string;\n\tcodeBlockBorder: (text: string) => string;\n\tquote: (text: string) => string;\n\tquoteBorder: (text: string) => string;\n\thr: (text: string) => string;\n\tlistBullet: (text: string) => string;\n\tbold: (text: string) => string;\n\titalic: (text: string) => string;\n\tstrikethrough: (text: string) => string;\n\tunderline: (text: string) => string;\n\thighlightCode?: (code: string, lang?: string) => string[];\n\t/** Prefix applied to each rendered code block line (default: \" \") */\n\tcodeBlockIndent?: string;\n}\n\nexport interface MarkdownOptions {\n\t/** Preserve source list markers instead of normalizing them. */\n\tpreserveOrderedListMarkers?: boolean;\n\t/** Preserve source backslash escapes instead of normalizing escaped punctuation. */\n\tpreserveBackslashEscapes?: boolean;\n\t/** Transform source Markdown before parsing, with the exact width available for content. */\n\ttransform?: (markdown: string, availableWidth: number) => string;\n\t/** Render supported LaTeX math expressions as Unicode text (default: true). */\n\trenderLatex?: boolean;\n}\n\ninterface InlineStyleContext {\n\tapplyText: (text: string) => string;\n\tstylePrefix: string;\n}\n\nexport class Markdown implements Component {\n\tprivate text: string;\n\tprivate paddingX: number; // Left/right padding\n\tprivate paddingY: number; // Top/bottom padding\n\tprivate defaultTextStyle?: DefaultTextStyle;\n\tprivate theme: MarkdownTheme;\n\tprivate options: MarkdownOptions;\n\tprivate defaultStylePrefix?: string;\n\n\t// Cache for rendered output\n\tprivate cachedText?: string;\n\tprivate cachedWidth?: number;\n\tprivate cachedLines?: string[];\n\n\tconstructor(\n\t\ttext: string,\n\t\tpaddingX: number,\n\t\tpaddingY: number,\n\t\ttheme: MarkdownTheme,\n\t\tdefaultTextStyle?: DefaultTextStyle,\n\t\toptions?: MarkdownOptions,\n\t) {\n\t\tthis.text = text;\n\t\tthis.paddingX = paddingX;\n\t\tthis.paddingY = paddingY;\n\t\tthis.theme = theme;\n\t\tthis.defaultTextStyle = defaultTextStyle;\n\t\tthis.options = options ? { ...options } : {};\n\t}\n\n\tsetText(text: string): void {\n\t\tthis.text = text;\n\t\tthis.invalidate();\n\t}\n\n\tinvalidate(): void {\n\t\tthis.cachedText = undefined;\n\t\tthis.cachedWidth = undefined;\n\t\tthis.cachedLines = undefined;\n\t}\n\n\trender(width: number): string[] {\n\t\t// Check cache\n\t\tif (this.cachedLines && this.cachedText === this.text && this.cachedWidth === width) {\n\t\t\treturn this.cachedLines;\n\t\t}\n\n\t\t// Calculate available width for content (subtract horizontal padding)\n\t\tconst contentWidth = Math.max(1, width - this.paddingX * 2);\n\t\tconst text = this.options.transform?.(this.text, contentWidth) ?? this.text;\n\n\t\t// Don't render anything if there's no actual text\n\t\tif (!text || text.trim() === \"\") {\n\t\t\tconst result: string[] = [];\n\t\t\t// Update cache\n\t\t\tthis.cachedText = this.text;\n\t\t\tthis.cachedWidth = width;\n\t\t\tthis.cachedLines = result;\n\t\t\treturn result;\n\t\t}\n\n\t\t// Replace tabs with 3 spaces for consistent rendering\n\t\tconst normalizedText = text.replace(/\\t/g, \" \");\n\n\t\t// Parse markdown to HTML-like tokens\n\t\tconst tokens = markdownParser.lexer(normalizedText);\n\t\ttrimPartialClosingFences(tokens);\n\n\t\t// Convert tokens to styled terminal output\n\t\tconst renderedLines: string[] = [];\n\n\t\tfor (let i = 0; i < tokens.length; i++) {\n\t\t\tconst token = tokens[i];\n\t\t\tconst nextToken = tokens[i + 1];\n\t\t\tconst tokenLines = this.renderToken(token, contentWidth, nextToken?.type);\n\t\t\tfor (const tokenLine of tokenLines) {\n\t\t\t\trenderedLines.push(tokenLine);\n\t\t\t}\n\t\t}\n\n\t\t// Wrap lines (NO padding, NO background yet)\n\t\tconst wrappedLines: string[] = [];\n\t\tfor (const line of renderedLines) {\n\t\t\tif (isImageLine(line)) {\n\t\t\t\twrappedLines.push(line);\n\t\t\t} else {\n\t\t\t\tfor (const wrappedLine of wrapTextWithAnsi(line, contentWidth)) {\n\t\t\t\t\twrappedLines.push(wrappedLine);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add margins and background to each wrapped line\n\t\tconst leftMargin = \" \".repeat(this.paddingX);\n\t\tconst rightMargin = \" \".repeat(this.paddingX);\n\t\tconst bgFn = this.defaultTextStyle?.bgColor;\n\t\tconst contentLines: string[] = [];\n\n\t\tfor (const line of wrappedLines) {\n\t\t\tif (isImageLine(line)) {\n\t\t\t\tcontentLines.push(line);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst lineWithMargins = leftMargin + line + rightMargin;\n\n\t\t\tif (bgFn) {\n\t\t\t\tcontentLines.push(applyBackgroundToLine(lineWithMargins, width, bgFn));\n\t\t\t} else {\n\t\t\t\t// No background - just pad to width\n\t\t\t\tconst visibleLen = visibleWidth(lineWithMargins);\n\t\t\t\tconst paddingNeeded = Math.max(0, width - visibleLen);\n\t\t\t\tcontentLines.push(lineWithMargins + \" \".repeat(paddingNeeded));\n\t\t\t}\n\t\t}\n\n\t\t// Add top/bottom padding (empty lines)\n\t\tconst emptyLine = \" \".repeat(width);\n\t\tconst emptyLines: string[] = [];\n\t\tfor (let i = 0; i < this.paddingY; i++) {\n\t\t\tconst line = bgFn ? applyBackgroundToLine(emptyLine, width, bgFn) : emptyLine;\n\t\t\temptyLines.push(line);\n\t\t}\n\n\t\t// Combine top padding, content, and bottom padding\n\t\tconst result = emptyLines.concat(contentLines, emptyLines);\n\n\t\t// Update cache\n\t\tthis.cachedText = this.text;\n\t\tthis.cachedWidth = width;\n\t\tthis.cachedLines = result;\n\n\t\treturn result.length > 0 ? result : [\"\"];\n\t}\n\n\t/**\n\t * Apply default text style to a string.\n\t * This is the base styling applied to all text content.\n\t * NOTE: Background color is NOT applied here - it's applied at the padding stage\n\t * to ensure it extends to the full line width.\n\t */\n\tprivate applyDefaultStyle(text: string): string {\n\t\tif (!this.defaultTextStyle) {\n\t\t\treturn text;\n\t\t}\n\n\t\tlet styled = text;\n\n\t\t// Apply foreground color (NOT background - that's applied at padding stage)\n\t\tif (this.defaultTextStyle.color) {\n\t\t\tstyled = this.defaultTextStyle.color(styled);\n\t\t}\n\n\t\t// Apply text decorations using this.theme\n\t\tif (this.defaultTextStyle.bold) {\n\t\t\tstyled = this.theme.bold(styled);\n\t\t}\n\t\tif (this.defaultTextStyle.italic) {\n\t\t\tstyled = this.theme.italic(styled);\n\t\t}\n\t\tif (this.defaultTextStyle.strikethrough) {\n\t\t\tstyled = this.theme.strikethrough(styled);\n\t\t}\n\t\tif (this.defaultTextStyle.underline) {\n\t\t\tstyled = this.theme.underline(styled);\n\t\t}\n\n\t\treturn styled;\n\t}\n\n\tprivate getDefaultStylePrefix(): string {\n\t\tif (!this.defaultTextStyle) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tif (this.defaultStylePrefix !== undefined) {\n\t\t\treturn this.defaultStylePrefix;\n\t\t}\n\n\t\tconst sentinel = \"\\u0000\";\n\t\tlet styled = sentinel;\n\n\t\tif (this.defaultTextStyle.color) {\n\t\t\tstyled = this.defaultTextStyle.color(styled);\n\t\t}\n\n\t\tif (this.defaultTextStyle.bold) {\n\t\t\tstyled = this.theme.bold(styled);\n\t\t}\n\t\tif (this.defaultTextStyle.italic) {\n\t\t\tstyled = this.theme.italic(styled);\n\t\t}\n\t\tif (this.defaultTextStyle.strikethrough) {\n\t\t\tstyled = this.theme.strikethrough(styled);\n\t\t}\n\t\tif (this.defaultTextStyle.underline) {\n\t\t\tstyled = this.theme.underline(styled);\n\t\t}\n\n\t\tconst sentinelIndex = styled.indexOf(sentinel);\n\t\tthis.defaultStylePrefix = sentinelIndex >= 0 ? styled.slice(0, sentinelIndex) : \"\";\n\t\treturn this.defaultStylePrefix;\n\t}\n\n\tprivate getStylePrefix(styleFn: (text: string) => string): string {\n\t\tconst sentinel = \"\\u0000\";\n\t\tconst styled = styleFn(sentinel);\n\t\tconst sentinelIndex = styled.indexOf(sentinel);\n\t\treturn sentinelIndex >= 0 ? styled.slice(0, sentinelIndex) : \"\";\n\t}\n\n\tprivate getDefaultInlineStyleContext(): InlineStyleContext {\n\t\treturn {\n\t\t\tapplyText: (text: string) => this.applyDefaultStyle(text),\n\t\t\tstylePrefix: this.getDefaultStylePrefix(),\n\t\t};\n\t}\n\n\tprivate renderToken(\n\t\ttoken: Token,\n\t\twidth: number,\n\t\tnextTokenType?: string,\n\t\tstyleContext?: InlineStyleContext,\n\t): string[] {\n\t\tconst lines: string[] = [];\n\n\t\tswitch (token.type) {\n\t\t\tcase \"heading\": {\n\t\t\t\tconst headingLevel = token.depth;\n\t\t\t\tconst headingPrefix = `${\"#\".repeat(headingLevel)} `;\n\n\t\t\t\t// Build a heading-specific style context so inline tokens (codespan, bold, etc.)\n\t\t\t\t// restore heading styling after their own ANSI resets instead of falling back to\n\t\t\t\t// the default text style.\n\t\t\t\tlet headingStyleFn: (text: string) => string;\n\t\t\t\tif (headingLevel === 1) {\n\t\t\t\t\theadingStyleFn = (text: string) => this.theme.heading(this.theme.bold(this.theme.underline(text)));\n\t\t\t\t} else {\n\t\t\t\t\theadingStyleFn = (text: string) => this.theme.heading(this.theme.bold(text));\n\t\t\t\t}\n\n\t\t\t\tconst headingStyleContext: InlineStyleContext = {\n\t\t\t\t\tapplyText: headingStyleFn,\n\t\t\t\t\tstylePrefix: this.getStylePrefix(headingStyleFn),\n\t\t\t\t};\n\n\t\t\t\tconst headingText = this.renderInlineTokens(token.tokens || [], headingStyleContext);\n\t\t\t\tconst styledHeading = headingLevel >= 3 ? headingStyleFn(headingPrefix) + headingText : headingText;\n\t\t\t\tlines.push(styledHeading);\n\t\t\t\tif (nextTokenType && nextTokenType !== \"space\") {\n\t\t\t\t\tlines.push(\"\"); // Add spacing after headings (unless space token follows)\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"paragraph\": {\n\t\t\t\tconst paragraphText = this.renderInlineTokens(token.tokens || [], styleContext);\n\t\t\t\tlines.push(paragraphText);\n\t\t\t\t// Don't add spacing if next token is space or list\n\t\t\t\tif (nextTokenType && nextTokenType !== \"list\" && nextTokenType !== \"space\") {\n\t\t\t\t\tlines.push(\"\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"text\":\n\t\t\t\tlines.push(this.renderInlineTokens([token], styleContext));\n\t\t\t\tbreak;\n\n\t\t\tcase \"latexBlock\": {\n\t\t\t\tconst latexToken = token as LatexToken;\n\t\t\t\tconst rendered =\n\t\t\t\t\t!latexToken.pending && this.options.renderLatex !== false\n\t\t\t\t\t\t? (renderLatex(latexToken.text, { display: true }) ?? latexToken.raw.trim())\n\t\t\t\t\t\t: latexToken.raw.trim();\n\t\t\t\tfor (const line of rendered.split(\"\\n\")) {\n\t\t\t\t\tlines.push(this.applyDefaultStyle(line));\n\t\t\t\t}\n\t\t\t\tif (nextTokenType && nextTokenType !== \"space\") {\n\t\t\t\t\tlines.push(\"\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"code\": {\n\t\t\t\tconst indent = this.theme.codeBlockIndent ?? \" \";\n\t\t\t\tlines.push(this.theme.codeBlockBorder(`\\`\\`\\`${token.lang || \"\"}`));\n\t\t\t\tif (this.theme.highlightCode) {\n\t\t\t\t\tconst highlightedLines = this.theme.highlightCode(token.text, token.lang);\n\t\t\t\t\tfor (const hlLine of highlightedLines) {\n\t\t\t\t\t\tlines.push(`${indent}${hlLine}`);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Split code by newlines and style each line\n\t\t\t\t\tconst codeLines = token.text.split(\"\\n\");\n\t\t\t\t\tfor (const codeLine of codeLines) {\n\t\t\t\t\t\tlines.push(`${indent}${this.theme.codeBlock(codeLine)}`);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlines.push(this.theme.codeBlockBorder(\"```\"));\n\t\t\t\tif (nextTokenType && nextTokenType !== \"space\") {\n\t\t\t\t\tlines.push(\"\"); // Add spacing after code blocks (unless space token follows)\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"list\": {\n\t\t\t\tconst listLines = this.renderList(token as Tokens.List, 0, width, styleContext);\n\t\t\t\tlines.push(...listLines);\n\t\t\t\t// Don't add spacing after lists if a space token follows\n\t\t\t\t// (the space token will handle it)\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"table\": {\n\t\t\t\tconst tableLines = this.renderTable(token as Tokens.Table, width, nextTokenType, styleContext);\n\t\t\t\tlines.push(...tableLines);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"blockquote\": {\n\t\t\t\tconst quoteStyle = (text: string) => this.theme.quote(this.theme.italic(text));\n\t\t\t\tconst quoteStylePrefix = this.getStylePrefix(quoteStyle);\n\t\t\t\tconst applyQuoteStyle = (line: string): string => {\n\t\t\t\t\tif (!quoteStylePrefix) {\n\t\t\t\t\t\treturn quoteStyle(line);\n\t\t\t\t\t}\n\t\t\t\t\tconst lineWithReappliedStyle = line.replace(/\\x1b\\[0m/g, `\\x1b[0m${quoteStylePrefix}`);\n\t\t\t\t\treturn quoteStyle(lineWithReappliedStyle);\n\t\t\t\t};\n\n\t\t\t\t// Calculate available width for quote content (subtract border \"│ \" = 2 chars)\n\t\t\t\tconst quoteContentWidth = Math.max(1, width - 2);\n\n\t\t\t\t// Blockquotes contain block-level tokens (paragraph, list, code, etc.), so render\n\t\t\t\t// children with renderToken() instead of renderInlineTokens().\n\t\t\t\t// Default message style should not apply inside blockquotes.\n\t\t\t\tconst quoteInlineStyleContext: InlineStyleContext = {\n\t\t\t\t\tapplyText: (text: string) => text,\n\t\t\t\t\tstylePrefix: quoteStylePrefix,\n\t\t\t\t};\n\t\t\t\tconst quoteTokens = token.tokens || [];\n\t\t\t\tconst renderedQuoteLines: string[] = [];\n\t\t\t\tfor (let i = 0; i < quoteTokens.length; i++) {\n\t\t\t\t\tconst quoteToken = quoteTokens[i];\n\t\t\t\t\tconst nextQuoteToken = quoteTokens[i + 1];\n\t\t\t\t\trenderedQuoteLines.push(\n\t\t\t\t\t\t...this.renderToken(quoteToken, quoteContentWidth, nextQuoteToken?.type, quoteInlineStyleContext),\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Avoid rendering an extra empty quote line before the outer blockquote spacing.\n\t\t\t\twhile (renderedQuoteLines.length > 0 && renderedQuoteLines[renderedQuoteLines.length - 1] === \"\") {\n\t\t\t\t\trenderedQuoteLines.pop();\n\t\t\t\t}\n\n\t\t\t\tfor (const quoteLine of renderedQuoteLines) {\n\t\t\t\t\tconst styledLine = applyQuoteStyle(quoteLine);\n\t\t\t\t\tconst wrappedLines = wrapTextWithAnsi(styledLine, quoteContentWidth);\n\t\t\t\t\tfor (const wrappedLine of wrappedLines) {\n\t\t\t\t\t\tlines.push(this.theme.quoteBorder(\"│ \") + wrappedLine);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (nextTokenType && nextTokenType !== \"space\") {\n\t\t\t\t\tlines.push(\"\"); // Add spacing after blockquotes (unless space token follows)\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"hr\":\n\t\t\t\tlines.push(this.theme.hr(\"─\".repeat(Math.min(width, 80))));\n\t\t\t\tif (nextTokenType && nextTokenType !== \"space\") {\n\t\t\t\t\tlines.push(\"\"); // Add spacing after horizontal rules (unless space token follows)\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase \"html\":\n\t\t\t\t// Render HTML as plain text (escaped for terminal)\n\t\t\t\tif (\"raw\" in token && typeof token.raw === \"string\") {\n\t\t\t\t\tlines.push(this.applyDefaultStyle(token.raw.trim()));\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase \"space\":\n\t\t\t\t// Space tokens represent blank lines in markdown\n\t\t\t\tlines.push(\"\");\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t// Handle any other token types as plain text\n\t\t\t\tif (\"text\" in token && typeof token.text === \"string\") {\n\t\t\t\t\tlines.push(token.text);\n\t\t\t\t}\n\t\t}\n\n\t\treturn lines;\n\t}\n\n\tprivate renderInlineTokens(tokens: Token[], styleContext?: InlineStyleContext): string {\n\t\tlet result = \"\";\n\t\tconst resolvedStyleContext = styleContext ?? this.getDefaultInlineStyleContext();\n\t\tconst { applyText, stylePrefix } = resolvedStyleContext;\n\t\tconst applyTextWithNewlines = (text: string): string => {\n\t\t\tconst segments: string[] = text.split(\"\\n\");\n\t\t\treturn segments.map((segment: string) => applyText(segment)).join(\"\\n\");\n\t\t};\n\n\t\tfor (const token of tokens) {\n\t\t\tswitch (token.type) {\n\t\t\t\tcase \"latex\": {\n\t\t\t\t\tconst latexToken = token as LatexToken;\n\t\t\t\t\tconst rendered =\n\t\t\t\t\t\t!latexToken.pending && this.options.renderLatex !== false\n\t\t\t\t\t\t\t? (renderLatex(latexToken.text) ?? latexToken.raw)\n\t\t\t\t\t\t\t: latexToken.raw;\n\t\t\t\t\tresult += applyTextWithNewlines(rendered);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase \"escape\":\n\t\t\t\t\tresult += applyTextWithNewlines(this.options.preserveBackslashEscapes ? token.raw : token.text);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"text\":\n\t\t\t\t\t// Text tokens in list items can have nested tokens for inline formatting\n\t\t\t\t\tif (token.tokens && token.tokens.length > 0) {\n\t\t\t\t\t\tresult += this.renderInlineTokens(token.tokens, resolvedStyleContext);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult += applyTextWithNewlines(token.text);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"paragraph\":\n\t\t\t\t\t// Paragraph tokens contain nested inline tokens\n\t\t\t\t\tresult += this.renderInlineTokens(token.tokens || [], resolvedStyleContext);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"strong\": {\n\t\t\t\t\tconst boldContent = this.renderInlineTokens(token.tokens || [], resolvedStyleContext);\n\t\t\t\t\tresult += this.theme.bold(boldContent) + stylePrefix;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase \"em\": {\n\t\t\t\t\tconst italicContent = this.renderInlineTokens(token.tokens || [], resolvedStyleContext);\n\t\t\t\t\tresult += this.theme.italic(italicContent) + stylePrefix;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase \"codespan\":\n\t\t\t\t\tresult += this.theme.code(token.text) + stylePrefix;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"link\": {\n\t\t\t\t\tconst linkText = this.renderInlineTokens(token.tokens || [], resolvedStyleContext);\n\t\t\t\t\tconst styledLink = this.theme.link(this.theme.underline(linkText));\n\t\t\t\t\tif (getCapabilities().hyperlinks) {\n\t\t\t\t\t\t// OSC 8: render as a clickable hyperlink. The URL is not printed inline,\n\t\t\t\t\t\t// so we always show only the link text regardless of whether it matches href.\n\t\t\t\t\t\tresult += hyperlink(styledLink, token.href) + stylePrefix;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Fallback: print URL in parentheses when text differs from href.\n\t\t\t\t\t\t// Compare raw token.text (not styled) against href for the equality check.\n\t\t\t\t\t\t// For mailto: links strip the prefix (autolinked emails use text=\"foo@bar.com\"\n\t\t\t\t\t\t// but href=\"mailto:foo@bar.com\").\n\t\t\t\t\t\tconst hrefForComparison = token.href.startsWith(\"mailto:\") ? token.href.slice(7) : token.href;\n\t\t\t\t\t\tif (token.text === token.href || token.text === hrefForComparison) {\n\t\t\t\t\t\t\tresult += styledLink + stylePrefix;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tresult += styledLink + this.theme.linkUrl(` (${token.href})`) + stylePrefix;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase \"br\":\n\t\t\t\t\tresult += \"\\n\";\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"del\": {\n\t\t\t\t\tconst delContent = this.renderInlineTokens(token.tokens || [], resolvedStyleContext);\n\t\t\t\t\tresult += this.theme.strikethrough(delContent) + stylePrefix;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase \"html\":\n\t\t\t\t\t// Render inline HTML as plain text\n\t\t\t\t\tif (\"raw\" in token && typeof token.raw === \"string\") {\n\t\t\t\t\t\tresult += applyTextWithNewlines(token.raw);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t// Handle any other inline token types as plain text\n\t\t\t\t\tif (\"text\" in token && typeof token.text === \"string\") {\n\t\t\t\t\t\tresult += applyTextWithNewlines(token.text);\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\twhile (stylePrefix && result.endsWith(stylePrefix)) {\n\t\t\tresult = result.slice(0, -stylePrefix.length);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tprivate getOrderedListMarker(item: Tokens.ListItem): string | undefined {\n\t\tconst match = /^(?: {0,3})(\\d{1,9}[.)])[ \\t]+/.exec(item.raw);\n\t\treturn match ? `${match[1]} ` : undefined;\n\t}\n\n\tprivate getUnorderedListMarker(item: Tokens.ListItem): string | undefined {\n\t\tconst match = /^(?: {0,3})([-+*])(?:[ \\t]+|(?=\\r?\\n|$))/.exec(item.raw);\n\t\treturn match ? `${match[1]} ` : undefined;\n\t}\n\n\t/**\n\t * Render a list with proper nesting support\n\t */\n\tprivate renderList(token: Tokens.List, depth: number, width: number, styleContext?: InlineStyleContext): string[] {\n\t\tconst lines: string[] = [];\n\t\tconst indent = \" \".repeat(depth);\n\t\t// Use the list's start property (defaults to 1 for ordered lists)\n\t\tconst startNumber = typeof token.start === \"number\" ? token.start : 1;\n\n\t\tfor (let i = 0; i < token.items.length; i++) {\n\t\t\tconst item = token.items[i];\n\t\t\tconst isLastItem = i === token.items.length - 1;\n\t\t\tconst bullet = token.ordered\n\t\t\t\t? this.options.preserveOrderedListMarkers\n\t\t\t\t\t? (this.getOrderedListMarker(item) ?? `${startNumber + i}. `)\n\t\t\t\t\t: `${startNumber + i}. `\n\t\t\t\t: this.options.preserveOrderedListMarkers\n\t\t\t\t\t? (this.getUnorderedListMarker(item) ?? \"- \")\n\t\t\t\t\t: \"- \";\n\t\t\tconst taskMarker = item.task ? `[${item.checked ? \"x\" : \" \"}] ` : \"\";\n\t\t\tconst marker = bullet + taskMarker;\n\t\t\tconst firstPrefix = indent + this.theme.listBullet(marker);\n\t\t\tconst continuationPrefix = indent + \" \".repeat(visibleWidth(marker));\n\t\t\tconst itemWidth = Math.max(1, width - visibleWidth(firstPrefix));\n\t\t\tlet renderedAnyLine = false;\n\n\t\t\tfor (const itemToken of item.tokens) {\n\t\t\t\tif (itemToken.type === \"list\") {\n\t\t\t\t\tlines.push(...this.renderList(itemToken as Tokens.List, depth + 1, width, styleContext));\n\t\t\t\t\trenderedAnyLine = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst itemLines = this.renderToken(itemToken, itemWidth, undefined, styleContext);\n\t\t\t\tfor (const line of itemLines) {\n\t\t\t\t\tfor (const wrappedLine of wrapTextWithAnsi(line, itemWidth)) {\n\t\t\t\t\t\tconst linePrefix = renderedAnyLine ? continuationPrefix : firstPrefix;\n\t\t\t\t\t\tlines.push(linePrefix + wrappedLine);\n\t\t\t\t\t\trenderedAnyLine = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!renderedAnyLine) {\n\t\t\t\tlines.push(firstPrefix);\n\t\t\t}\n\n\t\t\tif (token.loose && !isLastItem) {\n\t\t\t\tlines.push(\"\");\n\t\t\t}\n\t\t}\n\n\t\treturn lines;\n\t}\n\n\t/**\n\t * Get the visible width of the longest word in a string.\n\t */\n\tprivate getLongestWordWidth(text: string, maxWidth?: number): number {\n\t\tconst words = text.split(/\\s+/).filter((word) => word.length > 0);\n\t\tlet longest = 0;\n\t\tfor (const word of words) {\n\t\t\tlongest = Math.max(longest, visibleWidth(word));\n\t\t}\n\t\tif (maxWidth === undefined) {\n\t\t\treturn longest;\n\t\t}\n\t\treturn Math.min(longest, maxWidth);\n\t}\n\n\t/**\n\t * Wrap a table cell to fit into a column.\n\t *\n\t * Delegates to wrapTextWithAnsi() so ANSI codes + long tokens are handled\n\t * consistently with the rest of the renderer.\n\t */\n\tprivate wrapCellText(text: string, maxWidth: number): string[] {\n\t\treturn wrapTextWithAnsi(text, Math.max(1, maxWidth));\n\t}\n\n\t/**\n\t * Render a table with width-aware cell wrapping.\n\t * Cells that don't fit are wrapped to multiple lines.\n\t */\n\tprivate renderTable(\n\t\ttoken: Tokens.Table,\n\t\tavailableWidth: number,\n\t\tnextTokenType?: string,\n\t\tstyleContext?: InlineStyleContext,\n\t): string[] {\n\t\tconst lines: string[] = [];\n\t\tconst numCols = token.header.length;\n\n\t\tif (numCols === 0) {\n\t\t\treturn lines;\n\t\t}\n\n\t\t// Calculate border overhead: \"│ \" + (n-1) * \" │ \" + \" │\"\n\t\t// = 2 + (n-1) * 3 + 2 = 3n + 1\n\t\tconst borderOverhead = 3 * numCols + 1;\n\t\tconst availableForCells = availableWidth - borderOverhead;\n\t\tif (availableForCells < numCols) {\n\t\t\t// Too narrow to render a stable table. Fall back to raw markdown.\n\t\t\tconst fallbackLines = token.raw ? wrapTextWithAnsi(token.raw, availableWidth) : [];\n\t\t\tif (nextTokenType && nextTokenType !== \"space\") {\n\t\t\t\tfallbackLines.push(\"\");\n\t\t\t}\n\t\t\treturn fallbackLines;\n\t\t}\n\n\t\tconst maxUnbrokenWordWidth = 30;\n\n\t\t// Calculate natural column widths (what each column needs without constraints)\n\t\tconst naturalWidths: number[] = [];\n\t\tconst minWordWidths: number[] = [];\n\t\tfor (let i = 0; i < numCols; i++) {\n\t\t\tconst headerText = this.renderInlineTokens(token.header[i].tokens || [], styleContext);\n\t\t\tnaturalWidths[i] = visibleWidth(headerText);\n\t\t\tminWordWidths[i] = Math.max(1, this.getLongestWordWidth(headerText, maxUnbrokenWordWidth));\n\t\t}\n\t\tfor (const row of token.rows) {\n\t\t\tfor (let i = 0; i < row.length; i++) {\n\t\t\t\tconst cellText = this.renderInlineTokens(row[i].tokens || [], styleContext);\n\t\t\t\tnaturalWidths[i] = Math.max(naturalWidths[i] || 0, visibleWidth(cellText));\n\t\t\t\tminWordWidths[i] = Math.max(\n\t\t\t\t\tminWordWidths[i] || 1,\n\t\t\t\t\tthis.getLongestWordWidth(cellText, maxUnbrokenWordWidth),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tlet minColumnWidths = minWordWidths;\n\t\tlet minCellsWidth = minColumnWidths.reduce((a, b) => a + b, 0);\n\n\t\tif (minCellsWidth > availableForCells) {\n\t\t\tminColumnWidths = new Array(numCols).fill(1);\n\t\t\tconst remaining = availableForCells - numCols;\n\n\t\t\tif (remaining > 0) {\n\t\t\t\tconst totalWeight = minWordWidths.reduce((total, width) => total + Math.max(0, width - 1), 0);\n\t\t\t\tconst growth = minWordWidths.map((width) => {\n\t\t\t\t\tconst weight = Math.max(0, width - 1);\n\t\t\t\t\treturn totalWeight > 0 ? Math.floor((weight / totalWeight) * remaining) : 0;\n\t\t\t\t});\n\n\t\t\t\tfor (let i = 0; i < numCols; i++) {\n\t\t\t\t\tminColumnWidths[i] += growth[i] ?? 0;\n\t\t\t\t}\n\n\t\t\t\tconst allocated = growth.reduce((total, width) => total + width, 0);\n\t\t\t\tlet leftover = remaining - allocated;\n\t\t\t\tfor (let i = 0; leftover > 0 && i < numCols; i++) {\n\t\t\t\t\tminColumnWidths[i]++;\n\t\t\t\t\tleftover--;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tminCellsWidth = minColumnWidths.reduce((a, b) => a + b, 0);\n\t\t}\n\n\t\t// Calculate column widths that fit within available width\n\t\tconst totalNaturalWidth = naturalWidths.reduce((a, b) => a + b, 0) + borderOverhead;\n\t\tlet columnWidths: number[];\n\n\t\tif (totalNaturalWidth <= availableWidth) {\n\t\t\t// Everything fits naturally\n\t\t\tcolumnWidths = naturalWidths.map((width, index) => Math.max(width, minColumnWidths[index]));\n\t\t} else {\n\t\t\t// Need to shrink columns to fit\n\t\t\tconst totalGrowPotential = naturalWidths.reduce((total, width, index) => {\n\t\t\t\treturn total + Math.max(0, width - minColumnWidths[index]);\n\t\t\t}, 0);\n\t\t\tconst extraWidth = Math.max(0, availableForCells - minCellsWidth);\n\t\t\tcolumnWidths = minColumnWidths.map((minWidth, index) => {\n\t\t\t\tconst naturalWidth = naturalWidths[index];\n\t\t\t\tconst minWidthDelta = Math.max(0, naturalWidth - minWidth);\n\t\t\t\tlet grow = 0;\n\t\t\t\tif (totalGrowPotential > 0) {\n\t\t\t\t\tgrow = Math.floor((minWidthDelta / totalGrowPotential) * extraWidth);\n\t\t\t\t}\n\t\t\t\treturn minWidth + grow;\n\t\t\t});\n\n\t\t\t// Adjust for rounding errors - distribute remaining space\n\t\t\tconst allocated = columnWidths.reduce((a, b) => a + b, 0);\n\t\t\tlet remaining = availableForCells - allocated;\n\t\t\twhile (remaining > 0) {\n\t\t\t\tlet grew = false;\n\t\t\t\tfor (let i = 0; i < numCols && remaining > 0; i++) {\n\t\t\t\t\tif (columnWidths[i] < naturalWidths[i]) {\n\t\t\t\t\t\tcolumnWidths[i]++;\n\t\t\t\t\t\tremaining--;\n\t\t\t\t\t\tgrew = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!grew) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Render top border\n\t\tconst topBorderCells = columnWidths.map((w) => \"─\".repeat(w));\n\t\tlines.push(`┌─${topBorderCells.join(\"─┬─\")}─┐`);\n\n\t\t// Render header with wrapping\n\t\tconst headerCellLines: string[][] = token.header.map((cell, i) => {\n\t\t\tconst text = this.renderInlineTokens(cell.tokens || [], styleContext);\n\t\t\treturn this.wrapCellText(text, columnWidths[i]);\n\t\t});\n\t\tconst headerLineCount = Math.max(...headerCellLines.map((c) => c.length));\n\n\t\tfor (let lineIdx = 0; lineIdx < headerLineCount; lineIdx++) {\n\t\t\tconst rowParts = headerCellLines.map((cellLines, colIdx) => {\n\t\t\t\tconst text = cellLines[lineIdx] || \"\";\n\t\t\t\tconst padded = text + \" \".repeat(Math.max(0, columnWidths[colIdx] - visibleWidth(text)));\n\t\t\t\treturn this.theme.bold(padded);\n\t\t\t});\n\t\t\tlines.push(`│ ${rowParts.join(\" │ \")} │`);\n\t\t}\n\n\t\t// Render separator\n\t\tconst separatorCells = columnWidths.map((w) => \"─\".repeat(w));\n\t\tconst separatorLine = `├─${separatorCells.join(\"─┼─\")}─┤`;\n\t\tlines.push(separatorLine);\n\n\t\t// Render rows with wrapping\n\t\tfor (let rowIndex = 0; rowIndex < token.rows.length; rowIndex++) {\n\t\t\tconst row = token.rows[rowIndex];\n\t\t\tconst rowCellLines: string[][] = row.map((cell, i) => {\n\t\t\t\tconst text = this.renderInlineTokens(cell.tokens || [], styleContext);\n\t\t\t\treturn this.wrapCellText(text, columnWidths[i]);\n\t\t\t});\n\t\t\tconst rowLineCount = Math.max(...rowCellLines.map((c) => c.length));\n\n\t\t\tfor (let lineIdx = 0; lineIdx < rowLineCount; lineIdx++) {\n\t\t\t\tconst rowParts = rowCellLines.map((cellLines, colIdx) => {\n\t\t\t\t\tconst text = cellLines[lineIdx] || \"\";\n\t\t\t\t\treturn text + \" \".repeat(Math.max(0, columnWidths[colIdx] - visibleWidth(text)));\n\t\t\t\t});\n\t\t\t\tlines.push(`│ ${rowParts.join(\" │ \")} │`);\n\t\t\t}\n\n\t\t\tif (rowIndex < token.rows.length - 1) {\n\t\t\t\tlines.push(separatorLine);\n\t\t\t}\n\t\t}\n\n\t\t// Render bottom border\n\t\tconst bottomBorderCells = columnWidths.map((w) => \"─\".repeat(w));\n\t\tlines.push(`└─${bottomBorderCells.join(\"─┴─\")}─┘`);\n\n\t\tif (nextTokenType && nextTokenType !== \"space\") {\n\t\t\tlines.push(\"\"); // Add spacing after table\n\t\t}\n\t\treturn lines;\n\t}\n}\n"]}
1
+ {"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../src/components/markdown.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AA6K3C;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAChC,gCAAgC;IAChC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACjC,gCAAgC;IAChC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACnC,gBAAgB;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,kBAAkB;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,yBAAyB;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,qBAAqB;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC7B,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAClC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/B,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAClC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/B,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACpC,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC1C,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAChC,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACtC,EAAE,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC7B,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KA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ACnC,OAAO,CAAC,EAAE,eAAe,EAQzB;IAED,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAG1B;IAED,UAAU,IAAI,IAAI,CAIjB;IAED,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CA4F9B;IAED;;;;;OAKG;IACH,OAAO,CAAC,iBAAiB;IA6BzB,OAAO,CAAC,qBAAqB;IAkC7B,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,4BAA4B;IAOpC,OAAO,CAAC,WAAW;IAoLnB,OAAO,CAAC,kBAAkB;IA6G1B,OAAO,CAAC,oBAAoB;IAK5B,OAAO,CAAC,sBAAsB;IAK9B;;OAEG;IACH,OAAO,CAAC,UAAU;IAoDlB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAY3B;;;;;OAKG;IACH,OAAO,CAAC,YAAY;IASpB;;;OAGG;IACH,OAAO,CAAC,WAAW;CA6KnB","sourcesContent":["import { Marked, type Token, Tokenizer, type TokenizerExtension, type Tokens } from \"marked\";\nimport { renderLatex } from \"../latex.ts\";\nimport { getCapabilities, hyperlink, isImageLine } from \"../terminal-image.ts\";\nimport type { Component } from \"../tui.ts\";\nimport { applyBackgroundToLine, visibleWidth, wrapTextWithAnsi } from \"../utils.ts\";\n\nconst STRICT_STRIKETHROUGH_REGEX = /^(~~)(?=[^\\s~])((?:\\\\.|[^\\\\])*?(?:\\\\.|[^\\s~\\\\]))\\1(?=[^~]|$)/;\n\nclass StrictStrikethroughTokenizer extends Tokenizer {\n\toverride del(src: string): Tokens.Del | undefined {\n\t\tconst match = STRICT_STRIKETHROUGH_REGEX.exec(src);\n\t\tif (!match) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst text = match[2];\n\t\treturn {\n\t\t\ttype: \"del\",\n\t\t\traw: match[0],\n\t\t\ttext,\n\t\t\ttokens: this.lexer.inlineTokens(text),\n\t\t};\n\t}\n}\n\ninterface LatexToken extends Tokens.Generic {\n\ttype: \"latex\" | \"latexBlock\";\n\ttext: string;\n\tpending?: boolean;\n}\n\nfunction isEscaped(source: string, index: number): boolean {\n\tlet backslashes = 0;\n\tfor (let position = index - 1; position >= 0 && source[position] === \"\\\\\"; position--) {\n\t\tbackslashes++;\n\t}\n\treturn backslashes % 2 === 1;\n}\n\nfunction findClosingDelimiter(source: string, closing: string, start: number): number {\n\tlet index = source.indexOf(closing, start);\n\twhile (index >= 0 && isEscaped(source, index)) {\n\t\tindex = source.indexOf(closing, index + closing.length);\n\t}\n\treturn index;\n}\n\nfunction looksLikePendingDollarMath(source: string): boolean {\n\treturn /\\\\[A-Za-z]+|[_^=+*/<>()[\\]|±≤≥≠≈∈→⇒∞∫∑√-]/.test(source);\n}\n\nfunction tokenizeInlineLatex(source: string): LatexToken | undefined {\n\tlet opening = \"\";\n\tlet closing = \"\";\n\tif (source.startsWith(\"$$\")) {\n\t\topening = \"$$\";\n\t\tclosing = \"$$\";\n\t} else if (source.startsWith(\"\\\\(\")) {\n\t\topening = \"\\\\(\";\n\t\tclosing = \"\\\\)\";\n\t} else if (source.startsWith(\"\\\\[\")) {\n\t\topening = \"\\\\[\";\n\t\tclosing = \"\\\\]\";\n\t} else if (source.startsWith(\"$\") && !/^\\$\\s/.test(source)) {\n\t\topening = \"$\";\n\t\tclosing = \"$\";\n\t} else {\n\t\treturn undefined;\n\t}\n\n\tconst closingIndex = findClosingDelimiter(source, closing, opening.length);\n\tif (\n\t\tclosingIndex >= 0 &&\n\t\topening === \"$\" &&\n\t\t(/\\s$/.test(source.slice(opening.length, closingIndex)) ||\n\t\t\t/^\\d/.test(source.slice(closingIndex + 1)) ||\n\t\t\t(/^[A-Z_][A-Z0-9_]*(?:[^A-Za-z0-9_\\s])?$/.test(source.slice(opening.length, closingIndex)) &&\n\t\t\t\t/^[A-Za-z_][A-Za-z0-9_]*/.test(source.slice(closingIndex + 1))) ||\n\t\t\tsource.slice(opening.length, closingIndex).includes(\"`\"))\n\t) {\n\t\treturn undefined;\n\t}\n\n\tif (closingIndex < 0) {\n\t\tconst pendingSource = source.slice(opening.length);\n\t\tif (opening.startsWith(\"\\\\\") || looksLikePendingDollarMath(pendingSource)) {\n\t\t\treturn { type: \"latex\", raw: source, text: pendingSource, pending: true };\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tconst text = source.slice(opening.length, closingIndex);\n\tif (!text || text.includes(\"\\n\")) {\n\t\treturn undefined;\n\t}\n\n\tconst raw = source.slice(0, closingIndex + closing.length);\n\treturn { type: \"latex\", raw, text };\n}\n\nfunction tokenizeBlockLatex(source: string): LatexToken | undefined {\n\tconst dollarMatch = /^ {0,3}\\$\\$[ \\t]*(?:\\n)?([\\s\\S]*?)\\$\\$[ \\t]*(?:\\n|$)/.exec(source);\n\tif (dollarMatch?.[1]) {\n\t\treturn { type: \"latexBlock\", raw: dollarMatch[0], text: dollarMatch[1].trim() };\n\t}\n\n\tconst bracketMatch = /^ {0,3}\\\\\\[[ \\t]*(?:\\n)?([\\s\\S]*?)\\\\\\][ \\t]*(?:\\n|$)/.exec(source);\n\tif (bracketMatch?.[1]) {\n\t\treturn { type: \"latexBlock\", raw: bracketMatch[0], text: bracketMatch[1].trim() };\n\t}\n\n\tconst pendingBracket = /^ {0,3}\\\\\\[[ \\t]*(?:\\n)?([\\s\\S]*)$/.exec(source);\n\tif (pendingBracket) {\n\t\treturn { type: \"latexBlock\", raw: pendingBracket[0], text: pendingBracket[1], pending: true };\n\t}\n\tconst pendingDollar = /^ {0,3}\\$\\$[ \\t]*(?:\\n)?([\\s\\S]*)$/.exec(source);\n\tif (pendingDollar?.[1] && looksLikePendingDollarMath(pendingDollar[1])) {\n\t\treturn { type: \"latexBlock\", raw: pendingDollar[0], text: pendingDollar[1], pending: true };\n\t}\n\treturn undefined;\n}\n\nconst LATEX_MARKDOWN_EXTENSIONS: readonly TokenizerExtension[] = [\n\t{\n\t\tname: \"latexBlock\",\n\t\tlevel: \"block\",\n\t\tstart(source) {\n\t\t\tconst match = /(?:^|\\n) {0,3}(?:\\$\\$|\\\\\\[)/.exec(source);\n\t\t\treturn match ? match.index + (match[0].startsWith(\"\\n\") ? 1 : 0) : undefined;\n\t\t},\n\t\ttokenizer: tokenizeBlockLatex,\n\t},\n\t{\n\t\tname: \"latex\",\n\t\tlevel: \"inline\",\n\t\tstart(source) {\n\t\t\tconst indices = [source.indexOf(\"$\"), source.indexOf(\"\\\\(\"), source.indexOf(\"\\\\[\")].filter(\n\t\t\t\t(index) => index >= 0,\n\t\t\t);\n\t\t\treturn indices.length > 0 ? Math.min(...indices) : undefined;\n\t\t},\n\t\ttokenizer: tokenizeInlineLatex,\n\t},\n];\n\nfunction trimPartialClosingFences(tokens: readonly Token[]): void {\n\tconst token = tokens[tokens.length - 1];\n\tif (token?.type === \"list\") {\n\t\ttrimPartialClosingFences(token.items[token.items.length - 1]?.tokens ?? []);\n\t\treturn;\n\t}\n\tif (token?.type === \"blockquote\") {\n\t\ttrimPartialClosingFences(token.tokens ?? []);\n\t\treturn;\n\t}\n\tif (token?.type !== \"code\") {\n\t\treturn;\n\t}\n\n\t// Trim streamed partial closing fences so code blocks do not shrink/flicker\n\t// when the final fence character arrives. See https://github.com/earendil-works/pi/issues/5825.\n\tconst marker = /^(`{3,}|~{3,})/.exec(token.raw)?.[1];\n\tconst lastLine = token.raw.split(\"\\n\").pop();\n\tif (!marker || !lastLine || lastLine.length >= marker.length || lastLine !== marker[0]?.repeat(lastLine.length)) {\n\t\treturn;\n\t}\n\n\ttoken.text = token.text.slice(0, -lastLine.length).replace(/\\n$/, \"\");\n}\n\nconst markdownParser = new Marked();\nmarkdownParser.setOptions({\n\ttokenizer: new StrictStrikethroughTokenizer(),\n});\nmarkdownParser.use({ extensions: [...LATEX_MARKDOWN_EXTENSIONS] });\n\n/**\n * Default text styling for markdown content.\n * Applied to all text unless overridden by markdown formatting.\n */\nexport interface DefaultTextStyle {\n\t/** Foreground color function */\n\tcolor?: (text: string) => string;\n\t/** Background color function */\n\tbgColor?: (text: string) => string;\n\t/** Bold text */\n\tbold?: boolean;\n\t/** Italic text */\n\titalic?: boolean;\n\t/** Strikethrough text */\n\tstrikethrough?: boolean;\n\t/** Underline text */\n\tunderline?: boolean;\n}\n\n/**\n * Theme functions for markdown elements.\n * Each function takes text and returns styled text with ANSI codes.\n */\nexport interface MarkdownTheme {\n\theading: (text: string) => string;\n\tlink: (text: string) => string;\n\tlinkUrl: (text: string) => string;\n\tcode: (text: string) => string;\n\tcodeBlock: (text: string) => string;\n\tcodeBlockBorder: (text: string) => string;\n\tquote: (text: string) => string;\n\tquoteBorder: (text: string) => string;\n\thr: (text: string) => string;\n\tlistBullet: (text: string) => string;\n\tbold: (text: string) => string;\n\titalic: (text: string) => string;\n\tstrikethrough: (text: string) => string;\n\tunderline: (text: string) => string;\n\thighlightCode?: (code: string, lang?: string) => string[];\n\t/** Prefix applied to each rendered code block line (default: \" \") */\n\tcodeBlockIndent?: string;\n}\n\nexport interface MarkdownOptions {\n\t/** Preserve source list markers instead of normalizing them. */\n\tpreserveOrderedListMarkers?: boolean;\n\t/** Preserve source backslash escapes instead of normalizing escaped punctuation. */\n\tpreserveBackslashEscapes?: boolean;\n\t/** Transform source Markdown before parsing, with the exact width available for content. */\n\ttransform?: (markdown: string, availableWidth: number) => string;\n\t/** Render supported LaTeX math expressions as Unicode text (default: true). */\n\trenderLatex?: boolean;\n}\n\ninterface InlineStyleContext {\n\tapplyText: (text: string) => string;\n\tstylePrefix: string;\n}\n\nexport class Markdown implements Component {\n\tprivate text: string;\n\tprivate paddingX: number; // Left/right padding\n\tprivate paddingY: number; // Top/bottom padding\n\tprivate defaultTextStyle?: DefaultTextStyle;\n\tprivate theme: MarkdownTheme;\n\tprivate options: MarkdownOptions;\n\tprivate defaultStylePrefix?: string;\n\n\t// Cache for rendered output\n\tprivate cachedText?: string;\n\tprivate cachedWidth?: number;\n\tprivate cachedLines?: string[];\n\n\tconstructor(\n\t\ttext: string,\n\t\tpaddingX: number,\n\t\tpaddingY: number,\n\t\ttheme: MarkdownTheme,\n\t\tdefaultTextStyle?: DefaultTextStyle,\n\t\toptions?: MarkdownOptions,\n\t) {\n\t\tthis.text = text;\n\t\tthis.paddingX = paddingX;\n\t\tthis.paddingY = paddingY;\n\t\tthis.theme = theme;\n\t\tthis.defaultTextStyle = defaultTextStyle;\n\t\tthis.options = options ? { ...options } : {};\n\t}\n\n\tsetText(text: string): void {\n\t\tthis.text = text;\n\t\tthis.invalidate();\n\t}\n\n\tinvalidate(): void {\n\t\tthis.cachedText = undefined;\n\t\tthis.cachedWidth = undefined;\n\t\tthis.cachedLines = undefined;\n\t}\n\n\trender(width: number): string[] {\n\t\t// Check cache\n\t\tif (this.cachedLines && this.cachedText === this.text && this.cachedWidth === width) {\n\t\t\treturn this.cachedLines;\n\t\t}\n\n\t\t// Calculate available width for content (subtract horizontal padding)\n\t\tconst contentWidth = Math.max(1, width - this.paddingX * 2);\n\t\tconst text = this.options.transform?.(this.text, contentWidth) ?? this.text;\n\n\t\t// Don't render anything if there's no actual text\n\t\tif (!text || text.trim() === \"\") {\n\t\t\tconst result: string[] = [];\n\t\t\t// Update cache\n\t\t\tthis.cachedText = this.text;\n\t\t\tthis.cachedWidth = width;\n\t\t\tthis.cachedLines = result;\n\t\t\treturn result;\n\t\t}\n\n\t\t// Replace tabs with 3 spaces for consistent rendering\n\t\tconst normalizedText = text.replace(/\\t/g, \" \");\n\n\t\t// Parse markdown to HTML-like tokens\n\t\tconst tokens = markdownParser.lexer(normalizedText);\n\t\ttrimPartialClosingFences(tokens);\n\n\t\t// Convert tokens to styled terminal output\n\t\tconst renderedLines: string[] = [];\n\n\t\tfor (let i = 0; i < tokens.length; i++) {\n\t\t\tconst token = tokens[i];\n\t\t\tconst nextToken = tokens[i + 1];\n\t\t\tconst tokenLines = this.renderToken(token, contentWidth, nextToken?.type);\n\t\t\tfor (const tokenLine of tokenLines) {\n\t\t\t\trenderedLines.push(tokenLine);\n\t\t\t}\n\t\t}\n\n\t\t// Wrap lines (NO padding, NO background yet)\n\t\tconst wrappedLines: string[] = [];\n\t\tfor (const line of renderedLines) {\n\t\t\tif (isImageLine(line)) {\n\t\t\t\twrappedLines.push(line);\n\t\t\t} else {\n\t\t\t\tfor (const wrappedLine of wrapTextWithAnsi(line, contentWidth)) {\n\t\t\t\t\twrappedLines.push(wrappedLine);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add margins and background to each wrapped line\n\t\tconst leftMargin = \" \".repeat(this.paddingX);\n\t\tconst rightMargin = \" \".repeat(this.paddingX);\n\t\tconst bgFn = this.defaultTextStyle?.bgColor;\n\t\tconst contentLines: string[] = [];\n\n\t\tfor (const line of wrappedLines) {\n\t\t\tif (isImageLine(line)) {\n\t\t\t\tcontentLines.push(line);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst lineWithMargins = leftMargin + line + rightMargin;\n\n\t\t\tif (bgFn) {\n\t\t\t\tcontentLines.push(applyBackgroundToLine(lineWithMargins, width, bgFn));\n\t\t\t} else {\n\t\t\t\t// No background - just pad to width\n\t\t\t\tconst visibleLen = visibleWidth(lineWithMargins);\n\t\t\t\tconst paddingNeeded = Math.max(0, width - visibleLen);\n\t\t\t\tcontentLines.push(lineWithMargins + \" \".repeat(paddingNeeded));\n\t\t\t}\n\t\t}\n\n\t\t// Add top/bottom padding (empty lines)\n\t\tconst emptyLine = \" \".repeat(width);\n\t\tconst emptyLines: string[] = [];\n\t\tfor (let i = 0; i < this.paddingY; i++) {\n\t\t\tconst line = bgFn ? applyBackgroundToLine(emptyLine, width, bgFn) : emptyLine;\n\t\t\temptyLines.push(line);\n\t\t}\n\n\t\t// Combine top padding, content, and bottom padding\n\t\tconst result = emptyLines.concat(contentLines, emptyLines);\n\n\t\t// Update cache\n\t\tthis.cachedText = this.text;\n\t\tthis.cachedWidth = width;\n\t\tthis.cachedLines = result;\n\n\t\treturn result.length > 0 ? result : [\"\"];\n\t}\n\n\t/**\n\t * Apply default text style to a string.\n\t * This is the base styling applied to all text content.\n\t * NOTE: Background color is NOT applied here - it's applied at the padding stage\n\t * to ensure it extends to the full line width.\n\t */\n\tprivate applyDefaultStyle(text: string): string {\n\t\tif (!this.defaultTextStyle) {\n\t\t\treturn text;\n\t\t}\n\n\t\tlet styled = text;\n\n\t\t// Apply foreground color (NOT background - that's applied at padding stage)\n\t\tif (this.defaultTextStyle.color) {\n\t\t\tstyled = this.defaultTextStyle.color(styled);\n\t\t}\n\n\t\t// Apply text decorations using this.theme\n\t\tif (this.defaultTextStyle.bold) {\n\t\t\tstyled = this.theme.bold(styled);\n\t\t}\n\t\tif (this.defaultTextStyle.italic) {\n\t\t\tstyled = this.theme.italic(styled);\n\t\t}\n\t\tif (this.defaultTextStyle.strikethrough) {\n\t\t\tstyled = this.theme.strikethrough(styled);\n\t\t}\n\t\tif (this.defaultTextStyle.underline) {\n\t\t\tstyled = this.theme.underline(styled);\n\t\t}\n\n\t\treturn styled;\n\t}\n\n\tprivate getDefaultStylePrefix(): string {\n\t\tif (!this.defaultTextStyle) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tif (this.defaultStylePrefix !== undefined) {\n\t\t\treturn this.defaultStylePrefix;\n\t\t}\n\n\t\tconst sentinel = \"\\u0000\";\n\t\tlet styled = sentinel;\n\n\t\tif (this.defaultTextStyle.color) {\n\t\t\tstyled = this.defaultTextStyle.color(styled);\n\t\t}\n\n\t\tif (this.defaultTextStyle.bold) {\n\t\t\tstyled = this.theme.bold(styled);\n\t\t}\n\t\tif (this.defaultTextStyle.italic) {\n\t\t\tstyled = this.theme.italic(styled);\n\t\t}\n\t\tif (this.defaultTextStyle.strikethrough) {\n\t\t\tstyled = this.theme.strikethrough(styled);\n\t\t}\n\t\tif (this.defaultTextStyle.underline) {\n\t\t\tstyled = this.theme.underline(styled);\n\t\t}\n\n\t\tconst sentinelIndex = styled.indexOf(sentinel);\n\t\tthis.defaultStylePrefix = sentinelIndex >= 0 ? styled.slice(0, sentinelIndex) : \"\";\n\t\treturn this.defaultStylePrefix;\n\t}\n\n\tprivate getStylePrefix(styleFn: (text: string) => string): string {\n\t\tconst sentinel = \"\\u0000\";\n\t\tconst styled = styleFn(sentinel);\n\t\tconst sentinelIndex = styled.indexOf(sentinel);\n\t\treturn sentinelIndex >= 0 ? styled.slice(0, sentinelIndex) : \"\";\n\t}\n\n\tprivate getDefaultInlineStyleContext(): InlineStyleContext {\n\t\treturn {\n\t\t\tapplyText: (text: string) => this.applyDefaultStyle(text),\n\t\t\tstylePrefix: this.getDefaultStylePrefix(),\n\t\t};\n\t}\n\n\tprivate renderToken(\n\t\ttoken: Token,\n\t\twidth: number,\n\t\tnextTokenType?: string,\n\t\tstyleContext?: InlineStyleContext,\n\t): string[] {\n\t\tconst lines: string[] = [];\n\n\t\tswitch (token.type) {\n\t\t\tcase \"heading\": {\n\t\t\t\tconst headingLevel = token.depth;\n\t\t\t\tconst headingPrefix = `${\"#\".repeat(headingLevel)} `;\n\n\t\t\t\t// Build a heading-specific style context so inline tokens (codespan, bold, etc.)\n\t\t\t\t// restore heading styling after their own ANSI resets instead of falling back to\n\t\t\t\t// the default text style.\n\t\t\t\tlet headingStyleFn: (text: string) => string;\n\t\t\t\tif (headingLevel === 1) {\n\t\t\t\t\theadingStyleFn = (text: string) => this.theme.heading(this.theme.bold(this.theme.underline(text)));\n\t\t\t\t} else {\n\t\t\t\t\theadingStyleFn = (text: string) => this.theme.heading(this.theme.bold(text));\n\t\t\t\t}\n\n\t\t\t\tconst headingStyleContext: InlineStyleContext = {\n\t\t\t\t\tapplyText: headingStyleFn,\n\t\t\t\t\tstylePrefix: this.getStylePrefix(headingStyleFn),\n\t\t\t\t};\n\n\t\t\t\tconst headingText = this.renderInlineTokens(token.tokens || [], headingStyleContext);\n\t\t\t\tconst styledHeading = headingLevel >= 3 ? headingStyleFn(headingPrefix) + headingText : headingText;\n\t\t\t\tlines.push(styledHeading);\n\t\t\t\tif (nextTokenType && nextTokenType !== \"space\") {\n\t\t\t\t\tlines.push(\"\"); // Add spacing after headings (unless space token follows)\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"paragraph\": {\n\t\t\t\tconst paragraphText = this.renderInlineTokens(token.tokens || [], styleContext);\n\t\t\t\tlines.push(paragraphText);\n\t\t\t\t// Don't add spacing if next token is space or list\n\t\t\t\tif (nextTokenType && nextTokenType !== \"list\" && nextTokenType !== \"space\") {\n\t\t\t\t\tlines.push(\"\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"text\":\n\t\t\t\tlines.push(this.renderInlineTokens([token], styleContext));\n\t\t\t\tbreak;\n\n\t\t\tcase \"latexBlock\": {\n\t\t\t\tconst latexToken = token as LatexToken;\n\t\t\t\tconst rendered =\n\t\t\t\t\t!latexToken.pending && this.options.renderLatex !== false\n\t\t\t\t\t\t? (renderLatex(latexToken.text, { display: true }) ?? latexToken.raw.trim())\n\t\t\t\t\t\t: latexToken.raw.trim();\n\t\t\t\tfor (const line of rendered.split(\"\\n\")) {\n\t\t\t\t\tlines.push(this.applyDefaultStyle(line));\n\t\t\t\t}\n\t\t\t\tif (nextTokenType && nextTokenType !== \"space\") {\n\t\t\t\t\tlines.push(\"\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"code\": {\n\t\t\t\tconst indent = this.theme.codeBlockIndent ?? \" \";\n\t\t\t\tlines.push(this.theme.codeBlockBorder(`\\`\\`\\`${token.lang || \"\"}`));\n\t\t\t\tif (this.theme.highlightCode) {\n\t\t\t\t\tconst highlightedLines = this.theme.highlightCode(token.text, token.lang);\n\t\t\t\t\tfor (const hlLine of highlightedLines) {\n\t\t\t\t\t\tlines.push(`${indent}${hlLine}`);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Split code by newlines and style each line\n\t\t\t\t\tconst codeLines = token.text.split(\"\\n\");\n\t\t\t\t\tfor (const codeLine of codeLines) {\n\t\t\t\t\t\tlines.push(`${indent}${this.theme.codeBlock(codeLine)}`);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlines.push(this.theme.codeBlockBorder(\"```\"));\n\t\t\t\tif (nextTokenType && nextTokenType !== \"space\") {\n\t\t\t\t\tlines.push(\"\"); // Add spacing after code blocks (unless space token follows)\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"list\": {\n\t\t\t\tconst listLines = this.renderList(token as Tokens.List, 0, width, styleContext);\n\t\t\t\tlines.push(...listLines);\n\t\t\t\t// Don't add spacing after lists if a space token follows\n\t\t\t\t// (the space token will handle it)\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"table\": {\n\t\t\t\tconst tableLines = this.renderTable(token as Tokens.Table, width, nextTokenType, styleContext);\n\t\t\t\tlines.push(...tableLines);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"blockquote\": {\n\t\t\t\tconst quoteStyle = (text: string) => this.theme.quote(this.theme.italic(text));\n\t\t\t\tconst quoteStylePrefix = this.getStylePrefix(quoteStyle);\n\t\t\t\tconst applyQuoteStyle = (line: string): string => {\n\t\t\t\t\tif (!quoteStylePrefix) {\n\t\t\t\t\t\treturn quoteStyle(line);\n\t\t\t\t\t}\n\t\t\t\t\tconst lineWithReappliedStyle = line.replace(/\\x1b\\[0m/g, `\\x1b[0m${quoteStylePrefix}`);\n\t\t\t\t\treturn quoteStyle(lineWithReappliedStyle);\n\t\t\t\t};\n\n\t\t\t\t// Calculate available width for quote content (subtract border \"│ \" = 2 chars)\n\t\t\t\tconst quoteContentWidth = Math.max(1, width - 2);\n\n\t\t\t\t// Blockquotes contain block-level tokens (paragraph, list, code, etc.), so render\n\t\t\t\t// children with renderToken() instead of renderInlineTokens().\n\t\t\t\t// Default message style should not apply inside blockquotes.\n\t\t\t\tconst quoteInlineStyleContext: InlineStyleContext = {\n\t\t\t\t\tapplyText: (text: string) => text,\n\t\t\t\t\tstylePrefix: quoteStylePrefix,\n\t\t\t\t};\n\t\t\t\tconst quoteTokens = token.tokens || [];\n\t\t\t\tconst renderedQuoteLines: string[] = [];\n\t\t\t\tfor (let i = 0; i < quoteTokens.length; i++) {\n\t\t\t\t\tconst quoteToken = quoteTokens[i];\n\t\t\t\t\tconst nextQuoteToken = quoteTokens[i + 1];\n\t\t\t\t\trenderedQuoteLines.push(\n\t\t\t\t\t\t...this.renderToken(quoteToken, quoteContentWidth, nextQuoteToken?.type, quoteInlineStyleContext),\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Avoid rendering an extra empty quote line before the outer blockquote spacing.\n\t\t\t\twhile (renderedQuoteLines.length > 0 && renderedQuoteLines[renderedQuoteLines.length - 1] === \"\") {\n\t\t\t\t\trenderedQuoteLines.pop();\n\t\t\t\t}\n\n\t\t\t\tfor (const quoteLine of renderedQuoteLines) {\n\t\t\t\t\tconst styledLine = applyQuoteStyle(quoteLine);\n\t\t\t\t\tconst wrappedLines = wrapTextWithAnsi(styledLine, quoteContentWidth);\n\t\t\t\t\tfor (const wrappedLine of wrappedLines) {\n\t\t\t\t\t\tlines.push(this.theme.quoteBorder(\"│ \") + wrappedLine);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (nextTokenType && nextTokenType !== \"space\") {\n\t\t\t\t\tlines.push(\"\"); // Add spacing after blockquotes (unless space token follows)\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"hr\":\n\t\t\t\tlines.push(this.theme.hr(\"─\".repeat(Math.min(width, 80))));\n\t\t\t\tif (nextTokenType && nextTokenType !== \"space\") {\n\t\t\t\t\tlines.push(\"\"); // Add spacing after horizontal rules (unless space token follows)\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase \"html\":\n\t\t\t\t// Render HTML as plain text (escaped for terminal)\n\t\t\t\tif (\"raw\" in token && typeof token.raw === \"string\") {\n\t\t\t\t\tlines.push(this.applyDefaultStyle(token.raw.trim()));\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase \"space\":\n\t\t\t\t// Space tokens represent blank lines in markdown\n\t\t\t\tlines.push(\"\");\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t// Handle any other token types as plain text\n\t\t\t\tif (\"text\" in token && typeof token.text === \"string\") {\n\t\t\t\t\tlines.push(token.text);\n\t\t\t\t}\n\t\t}\n\n\t\treturn lines;\n\t}\n\n\tprivate renderInlineTokens(tokens: Token[], styleContext?: InlineStyleContext): string {\n\t\tlet result = \"\";\n\t\tconst resolvedStyleContext = styleContext ?? this.getDefaultInlineStyleContext();\n\t\tconst { applyText, stylePrefix } = resolvedStyleContext;\n\t\tconst applyTextWithNewlines = (text: string): string => {\n\t\t\tconst segments: string[] = text.split(\"\\n\");\n\t\t\treturn segments.map((segment: string) => applyText(segment)).join(\"\\n\");\n\t\t};\n\n\t\tfor (const token of tokens) {\n\t\t\tswitch (token.type) {\n\t\t\t\tcase \"latex\": {\n\t\t\t\t\tconst latexToken = token as LatexToken;\n\t\t\t\t\tconst rendered =\n\t\t\t\t\t\t!latexToken.pending && this.options.renderLatex !== false\n\t\t\t\t\t\t\t? (renderLatex(latexToken.text) ?? latexToken.raw)\n\t\t\t\t\t\t\t: latexToken.raw;\n\t\t\t\t\tresult += applyTextWithNewlines(rendered);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase \"escape\":\n\t\t\t\t\tresult += applyTextWithNewlines(this.options.preserveBackslashEscapes ? token.raw : token.text);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"text\":\n\t\t\t\t\t// Text tokens in list items can have nested tokens for inline formatting\n\t\t\t\t\tif (token.tokens && token.tokens.length > 0) {\n\t\t\t\t\t\tresult += this.renderInlineTokens(token.tokens, resolvedStyleContext);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult += applyTextWithNewlines(token.text);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"paragraph\":\n\t\t\t\t\t// Paragraph tokens contain nested inline tokens\n\t\t\t\t\tresult += this.renderInlineTokens(token.tokens || [], resolvedStyleContext);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"strong\": {\n\t\t\t\t\tconst boldContent = this.renderInlineTokens(token.tokens || [], resolvedStyleContext);\n\t\t\t\t\tresult += this.theme.bold(boldContent) + stylePrefix;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase \"em\": {\n\t\t\t\t\tconst italicContent = this.renderInlineTokens(token.tokens || [], resolvedStyleContext);\n\t\t\t\t\tresult += this.theme.italic(italicContent) + stylePrefix;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase \"codespan\":\n\t\t\t\t\tresult += this.theme.code(token.text) + stylePrefix;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"link\": {\n\t\t\t\t\tconst linkText = this.renderInlineTokens(token.tokens || [], resolvedStyleContext);\n\t\t\t\t\tconst styledLink = this.theme.link(this.theme.underline(linkText));\n\t\t\t\t\tif (getCapabilities().hyperlinks) {\n\t\t\t\t\t\t// OSC 8: render as a clickable hyperlink. The URL is not printed inline,\n\t\t\t\t\t\t// so we always show only the link text regardless of whether it matches href.\n\t\t\t\t\t\tresult += hyperlink(styledLink, token.href) + stylePrefix;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Fallback: print URL in parentheses when text differs from href.\n\t\t\t\t\t\t// Compare raw token.text (not styled) against href for the equality check.\n\t\t\t\t\t\t// For mailto: links strip the prefix (autolinked emails use text=\"foo@bar.com\"\n\t\t\t\t\t\t// but href=\"mailto:foo@bar.com\").\n\t\t\t\t\t\tconst hrefForComparison = token.href.startsWith(\"mailto:\") ? token.href.slice(7) : token.href;\n\t\t\t\t\t\tif (token.text === token.href || token.text === hrefForComparison) {\n\t\t\t\t\t\t\tresult += styledLink + stylePrefix;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tresult += styledLink + this.theme.linkUrl(` (${token.href})`) + stylePrefix;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase \"br\":\n\t\t\t\t\tresult += \"\\n\";\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"del\": {\n\t\t\t\t\tconst delContent = this.renderInlineTokens(token.tokens || [], resolvedStyleContext);\n\t\t\t\t\tresult += this.theme.strikethrough(delContent) + stylePrefix;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase \"html\":\n\t\t\t\t\t// Render inline HTML as plain text\n\t\t\t\t\tif (\"raw\" in token && typeof token.raw === \"string\") {\n\t\t\t\t\t\tresult += applyTextWithNewlines(token.raw);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t// Handle any other inline token types as plain text\n\t\t\t\t\tif (\"text\" in token && typeof token.text === \"string\") {\n\t\t\t\t\t\tresult += applyTextWithNewlines(token.text);\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\twhile (stylePrefix && result.endsWith(stylePrefix)) {\n\t\t\tresult = result.slice(0, -stylePrefix.length);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tprivate getOrderedListMarker(item: Tokens.ListItem): string | undefined {\n\t\tconst match = /^(?: {0,3})(\\d{1,9}[.)])[ \\t]+/.exec(item.raw);\n\t\treturn match ? `${match[1]} ` : undefined;\n\t}\n\n\tprivate getUnorderedListMarker(item: Tokens.ListItem): string | undefined {\n\t\tconst match = /^(?: {0,3})([-+*])(?:[ \\t]+|(?=\\r?\\n|$))/.exec(item.raw);\n\t\treturn match ? `${match[1]} ` : undefined;\n\t}\n\n\t/**\n\t * Render a list with proper nesting support\n\t */\n\tprivate renderList(token: Tokens.List, depth: number, width: number, styleContext?: InlineStyleContext): string[] {\n\t\tconst lines: string[] = [];\n\t\tconst indent = \" \".repeat(depth);\n\t\t// Use the list's start property (defaults to 1 for ordered lists)\n\t\tconst startNumber = typeof token.start === \"number\" ? token.start : 1;\n\n\t\tfor (let i = 0; i < token.items.length; i++) {\n\t\t\tconst item = token.items[i];\n\t\t\tconst isLastItem = i === token.items.length - 1;\n\t\t\tconst bullet = token.ordered\n\t\t\t\t? this.options.preserveOrderedListMarkers\n\t\t\t\t\t? (this.getOrderedListMarker(item) ?? `${startNumber + i}. `)\n\t\t\t\t\t: `${startNumber + i}. `\n\t\t\t\t: this.options.preserveOrderedListMarkers\n\t\t\t\t\t? (this.getUnorderedListMarker(item) ?? \"- \")\n\t\t\t\t\t: \"- \";\n\t\t\tconst taskMarker = item.task ? `[${item.checked ? \"x\" : \" \"}] ` : \"\";\n\t\t\tconst marker = bullet + taskMarker;\n\t\t\tconst firstPrefix = indent + this.theme.listBullet(marker);\n\t\t\tconst continuationPrefix = indent + \" \".repeat(visibleWidth(marker));\n\t\t\tconst itemWidth = Math.max(1, width - visibleWidth(firstPrefix));\n\t\t\tlet renderedAnyLine = false;\n\n\t\t\tfor (const itemToken of item.tokens) {\n\t\t\t\tif (itemToken.type === \"list\") {\n\t\t\t\t\tlines.push(...this.renderList(itemToken as Tokens.List, depth + 1, width, styleContext));\n\t\t\t\t\trenderedAnyLine = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst itemLines = this.renderToken(itemToken, itemWidth, undefined, styleContext);\n\t\t\t\tfor (const line of itemLines) {\n\t\t\t\t\tfor (const wrappedLine of wrapTextWithAnsi(line, itemWidth)) {\n\t\t\t\t\t\tconst linePrefix = renderedAnyLine ? continuationPrefix : firstPrefix;\n\t\t\t\t\t\tlines.push(linePrefix + wrappedLine);\n\t\t\t\t\t\trenderedAnyLine = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!renderedAnyLine) {\n\t\t\t\tlines.push(firstPrefix);\n\t\t\t}\n\n\t\t\tif (token.loose && !isLastItem) {\n\t\t\t\tlines.push(\"\");\n\t\t\t}\n\t\t}\n\n\t\treturn lines;\n\t}\n\n\t/**\n\t * Get the visible width of the longest word in a string.\n\t */\n\tprivate getLongestWordWidth(text: string, maxWidth?: number): number {\n\t\tconst words = text.split(/\\s+/).filter((word) => word.length > 0);\n\t\tlet longest = 0;\n\t\tfor (const word of words) {\n\t\t\tlongest = Math.max(longest, visibleWidth(word));\n\t\t}\n\t\tif (maxWidth === undefined) {\n\t\t\treturn longest;\n\t\t}\n\t\treturn Math.min(longest, maxWidth);\n\t}\n\n\t/**\n\t * Wrap a table cell to fit into a column.\n\t *\n\t * Delegates to wrapTextWithAnsi() so ANSI codes + long tokens are handled\n\t * consistently with the rest of the renderer.\n\t */\n\tprivate wrapCellText(text: string, maxWidth: number, stylePrefix = \"\"): string[] {\n\t\tconst lines = wrapTextWithAnsi(text, Math.max(1, maxWidth));\n\t\treturn lines.map((line, index) => {\n\t\t\t// Reset text styles after each non-final fragment, then restore the surrounding style before padding and borders.\n\t\t\tconst styleReset = index < lines.length - 1 ? \"\\x1b[22;23;24;25;27;28;29;39m\" : \"\";\n\t\t\treturn `${line}${styleReset}${stylePrefix}`;\n\t\t});\n\t}\n\n\t/**\n\t * Render a table with width-aware cell wrapping.\n\t * Cells that don't fit are wrapped to multiple lines.\n\t */\n\tprivate renderTable(\n\t\ttoken: Tokens.Table,\n\t\tavailableWidth: number,\n\t\tnextTokenType?: string,\n\t\tstyleContext?: InlineStyleContext,\n\t): string[] {\n\t\tconst lines: string[] = [];\n\t\tconst numCols = token.header.length;\n\n\t\tif (numCols === 0) {\n\t\t\treturn lines;\n\t\t}\n\n\t\t// Calculate border overhead: \"│ \" + (n-1) * \" │ \" + \" │\"\n\t\t// = 2 + (n-1) * 3 + 2 = 3n + 1\n\t\tconst borderOverhead = 3 * numCols + 1;\n\t\tconst availableForCells = availableWidth - borderOverhead;\n\t\tif (availableForCells < numCols) {\n\t\t\t// Too narrow to render a stable table. Fall back to raw markdown.\n\t\t\tconst fallbackLines = token.raw ? wrapTextWithAnsi(token.raw, availableWidth) : [];\n\t\t\tif (nextTokenType && nextTokenType !== \"space\") {\n\t\t\t\tfallbackLines.push(\"\");\n\t\t\t}\n\t\t\treturn fallbackLines;\n\t\t}\n\n\t\tconst maxUnbrokenWordWidth = 30;\n\n\t\t// Calculate natural column widths (what each column needs without constraints)\n\t\tconst naturalWidths: number[] = [];\n\t\tconst minWordWidths: number[] = [];\n\t\tfor (let i = 0; i < numCols; i++) {\n\t\t\tconst headerText = this.renderInlineTokens(token.header[i].tokens || [], styleContext);\n\t\t\tnaturalWidths[i] = visibleWidth(headerText);\n\t\t\tminWordWidths[i] = Math.max(1, this.getLongestWordWidth(headerText, maxUnbrokenWordWidth));\n\t\t}\n\t\tfor (const row of token.rows) {\n\t\t\tfor (let i = 0; i < row.length; i++) {\n\t\t\t\tconst cellText = this.renderInlineTokens(row[i].tokens || [], styleContext);\n\t\t\t\tnaturalWidths[i] = Math.max(naturalWidths[i] || 0, visibleWidth(cellText));\n\t\t\t\tminWordWidths[i] = Math.max(\n\t\t\t\t\tminWordWidths[i] || 1,\n\t\t\t\t\tthis.getLongestWordWidth(cellText, maxUnbrokenWordWidth),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tlet minColumnWidths = minWordWidths;\n\t\tlet minCellsWidth = minColumnWidths.reduce((a, b) => a + b, 0);\n\n\t\tif (minCellsWidth > availableForCells) {\n\t\t\tminColumnWidths = new Array(numCols).fill(1);\n\t\t\tconst remaining = availableForCells - numCols;\n\n\t\t\tif (remaining > 0) {\n\t\t\t\tconst totalWeight = minWordWidths.reduce((total, width) => total + Math.max(0, width - 1), 0);\n\t\t\t\tconst growth = minWordWidths.map((width) => {\n\t\t\t\t\tconst weight = Math.max(0, width - 1);\n\t\t\t\t\treturn totalWeight > 0 ? Math.floor((weight / totalWeight) * remaining) : 0;\n\t\t\t\t});\n\n\t\t\t\tfor (let i = 0; i < numCols; i++) {\n\t\t\t\t\tminColumnWidths[i] += growth[i] ?? 0;\n\t\t\t\t}\n\n\t\t\t\tconst allocated = growth.reduce((total, width) => total + width, 0);\n\t\t\t\tlet leftover = remaining - allocated;\n\t\t\t\tfor (let i = 0; leftover > 0 && i < numCols; i++) {\n\t\t\t\t\tminColumnWidths[i]++;\n\t\t\t\t\tleftover--;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tminCellsWidth = minColumnWidths.reduce((a, b) => a + b, 0);\n\t\t}\n\n\t\t// Calculate column widths that fit within available width\n\t\tconst totalNaturalWidth = naturalWidths.reduce((a, b) => a + b, 0) + borderOverhead;\n\t\tlet columnWidths: number[];\n\n\t\tif (totalNaturalWidth <= availableWidth) {\n\t\t\t// Everything fits naturally\n\t\t\tcolumnWidths = naturalWidths.map((width, index) => Math.max(width, minColumnWidths[index]));\n\t\t} else {\n\t\t\t// Need to shrink columns to fit\n\t\t\tconst totalGrowPotential = naturalWidths.reduce((total, width, index) => {\n\t\t\t\treturn total + Math.max(0, width - minColumnWidths[index]);\n\t\t\t}, 0);\n\t\t\tconst extraWidth = Math.max(0, availableForCells - minCellsWidth);\n\t\t\tcolumnWidths = minColumnWidths.map((minWidth, index) => {\n\t\t\t\tconst naturalWidth = naturalWidths[index];\n\t\t\t\tconst minWidthDelta = Math.max(0, naturalWidth - minWidth);\n\t\t\t\tlet grow = 0;\n\t\t\t\tif (totalGrowPotential > 0) {\n\t\t\t\t\tgrow = Math.floor((minWidthDelta / totalGrowPotential) * extraWidth);\n\t\t\t\t}\n\t\t\t\treturn minWidth + grow;\n\t\t\t});\n\n\t\t\t// Adjust for rounding errors - distribute remaining space\n\t\t\tconst allocated = columnWidths.reduce((a, b) => a + b, 0);\n\t\t\tlet remaining = availableForCells - allocated;\n\t\t\twhile (remaining > 0) {\n\t\t\t\tlet grew = false;\n\t\t\t\tfor (let i = 0; i < numCols && remaining > 0; i++) {\n\t\t\t\t\tif (columnWidths[i] < naturalWidths[i]) {\n\t\t\t\t\t\tcolumnWidths[i]++;\n\t\t\t\t\t\tremaining--;\n\t\t\t\t\t\tgrew = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!grew) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Render top border\n\t\tconst topBorderCells = columnWidths.map((w) => \"─\".repeat(w));\n\t\tlines.push(`┌─${topBorderCells.join(\"─┬─\")}─┐`);\n\n\t\t// Render header with wrapping\n\t\tconst headerCellLines: string[][] = token.header.map((cell, i) => {\n\t\t\tconst text = this.renderInlineTokens(cell.tokens || [], styleContext);\n\t\t\treturn this.wrapCellText(text, columnWidths[i], styleContext?.stylePrefix);\n\t\t});\n\t\tconst headerLineCount = Math.max(...headerCellLines.map((c) => c.length));\n\n\t\tfor (let lineIdx = 0; lineIdx < headerLineCount; lineIdx++) {\n\t\t\tconst rowParts = headerCellLines.map((cellLines, colIdx) => {\n\t\t\t\tconst text = cellLines[lineIdx] || \"\";\n\t\t\t\tconst padded = text + \" \".repeat(Math.max(0, columnWidths[colIdx] - visibleWidth(text)));\n\t\t\t\treturn this.theme.bold(padded);\n\t\t\t});\n\t\t\tlines.push(`│ ${rowParts.join(\" │ \")} │`);\n\t\t}\n\n\t\t// Render separator\n\t\tconst separatorCells = columnWidths.map((w) => \"─\".repeat(w));\n\t\tconst separatorLine = `├─${separatorCells.join(\"─┼─\")}─┤`;\n\t\tlines.push(separatorLine);\n\n\t\t// Render rows with wrapping\n\t\tfor (let rowIndex = 0; rowIndex < token.rows.length; rowIndex++) {\n\t\t\tconst row = token.rows[rowIndex];\n\t\t\tconst rowCellLines: string[][] = row.map((cell, i) => {\n\t\t\t\tconst text = this.renderInlineTokens(cell.tokens || [], styleContext);\n\t\t\t\treturn this.wrapCellText(text, columnWidths[i], styleContext?.stylePrefix);\n\t\t\t});\n\t\t\tconst rowLineCount = Math.max(...rowCellLines.map((c) => c.length));\n\n\t\t\tfor (let lineIdx = 0; lineIdx < rowLineCount; lineIdx++) {\n\t\t\t\tconst rowParts = rowCellLines.map((cellLines, colIdx) => {\n\t\t\t\t\tconst text = cellLines[lineIdx] || \"\";\n\t\t\t\t\treturn text + \" \".repeat(Math.max(0, columnWidths[colIdx] - visibleWidth(text)));\n\t\t\t\t});\n\t\t\t\tlines.push(`│ ${rowParts.join(\" │ \")} │`);\n\t\t\t}\n\n\t\t\tif (rowIndex < token.rows.length - 1) {\n\t\t\t\tlines.push(separatorLine);\n\t\t\t}\n\t\t}\n\n\t\t// Render bottom border\n\t\tconst bottomBorderCells = columnWidths.map((w) => \"─\".repeat(w));\n\t\tlines.push(`└─${bottomBorderCells.join(\"─┴─\")}─┘`);\n\n\t\tif (nextTokenType && nextTokenType !== \"space\") {\n\t\t\tlines.push(\"\"); // Add spacing after table\n\t\t}\n\t\treturn lines;\n\t}\n}\n"]}
@@ -651,8 +651,13 @@ export class Markdown {
651
651
  * Delegates to wrapTextWithAnsi() so ANSI codes + long tokens are handled
652
652
  * consistently with the rest of the renderer.
653
653
  */
654
- wrapCellText(text, maxWidth) {
655
- return wrapTextWithAnsi(text, Math.max(1, maxWidth));
654
+ wrapCellText(text, maxWidth, stylePrefix = "") {
655
+ const lines = wrapTextWithAnsi(text, Math.max(1, maxWidth));
656
+ return lines.map((line, index) => {
657
+ // Reset text styles after each non-final fragment, then restore the surrounding style before padding and borders.
658
+ const styleReset = index < lines.length - 1 ? "\x1b[22;23;24;25;27;28;29;39m" : "";
659
+ return `${line}${styleReset}${stylePrefix}`;
660
+ });
656
661
  }
657
662
  /**
658
663
  * Render a table with width-aware cell wrapping.
@@ -760,7 +765,7 @@ export class Markdown {
760
765
  // Render header with wrapping
761
766
  const headerCellLines = token.header.map((cell, i) => {
762
767
  const text = this.renderInlineTokens(cell.tokens || [], styleContext);
763
- return this.wrapCellText(text, columnWidths[i]);
768
+ return this.wrapCellText(text, columnWidths[i], styleContext?.stylePrefix);
764
769
  });
765
770
  const headerLineCount = Math.max(...headerCellLines.map((c) => c.length));
766
771
  for (let lineIdx = 0; lineIdx < headerLineCount; lineIdx++) {
@@ -780,7 +785,7 @@ export class Markdown {
780
785
  const row = token.rows[rowIndex];
781
786
  const rowCellLines = row.map((cell, i) => {
782
787
  const text = this.renderInlineTokens(cell.tokens || [], styleContext);
783
- return this.wrapCellText(text, columnWidths[i]);
788
+ return this.wrapCellText(text, columnWidths[i], styleContext?.stylePrefix);
784
789
  });
785
790
  const rowLineCount = Math.max(...rowCellLines.map((c) => c.length));
786
791
  for (let lineIdx = 0; lineIdx < rowLineCount; lineIdx++) {