import { parseContextReferences as s } from "@kiro/context-providers";
import { a as p } from "./logger-CTb8_yz9.js";
import "crypto";
import "os";
import "path";
import "./prompt-DuC9mWRH.js";
import "zod";
import "dedent";
import "vscode-uri";
import "./message-analyzer-BAqw8PNp.js";
import "./number-coercion-CeAOJ7Po.js";
import "@aws/codewhisperer-streaming-client";
import "./index-C-CV5vnh.js";
import "axios";
import "axios-retry";
import "@mozilla/readability";
import "jsdom";
async function q(o, m) {
  const i = s(o);
  if (i.length === 0)
    return o;
  let t = o;
  for (const r of i.reverse()) {
    const n = m?.get(r.providerId);
    if (n) {
      try {
        const e = await n.resolveContent(r.query ?? "");
        t = t.replace(r.fullMatch, e);
      } catch (e) {
        p.error(`[CustomAgentContext] Error resolving provider '${r.providerId}':`, e);
      }
      continue;
    }
    p.warn(`[CustomAgentContext] Provider '${r.providerId}' not found`);
  }
  return t;
}
export {
  q as p
};
//# sourceMappingURL=prompt-processor-Dw_f2vjD.js.map
