llm-kb 0.2.0 → 0.4.1
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.
- package/README.md +322 -60
- package/bin/anthropic-5TIU2EED.js +5515 -0
- package/bin/azure-openai-responses-ZVUVMK3G.js +190 -0
- package/bin/chunk-2WV6TQRI.js +4792 -0
- package/bin/chunk-3YMNGUZZ.js +262 -0
- package/bin/chunk-5PYKQQLA.js +14295 -0
- package/bin/chunk-65KFH7OI.js +31 -0
- package/bin/chunk-DHOXVEIR.js +7261 -0
- package/bin/chunk-EAQYK3U2.js +41 -0
- package/bin/chunk-IFS3OKBN.js +428 -0
- package/bin/chunk-LDHOKBJA.js +86 -0
- package/bin/chunk-SLYBG6ZQ.js +32681 -0
- package/bin/chunk-UEODFF7H.js +17 -0
- package/bin/chunk-XCXTZJGO.js +174 -0
- package/bin/chunk-XFV534WU.js +7056 -0
- package/bin/cli.js +5496 -163
- package/bin/dist-3YH7P2QF.js +1244 -0
- package/bin/google-JFC43EFJ.js +371 -0
- package/bin/google-gemini-cli-K4XNMYDI.js +712 -0
- package/bin/google-vertex-Y42F254G.js +414 -0
- package/bin/indexer-KSYRIVVN.js +10 -0
- package/bin/mistral-ZU2JS5XZ.js +38406 -0
- package/bin/multipart-parser-CO464TZY.js +371 -0
- package/bin/openai-codex-responses-NW2LELBH.js +712 -0
- package/bin/openai-completions-TW3VKTHO.js +662 -0
- package/bin/openai-responses-VGL522MK.js +198 -0
- package/bin/src-Y22OHE3S.js +1408 -0
- package/package.json +16 -6
- package/PHASE2_SPEC.md +0 -274
- package/SPEC.md +0 -275
- package/bin/chunk-MYQ36JJB.js +0 -118
- package/bin/indexer-LSYSZXZX.js +0 -6
- package/plan.md +0 -55
- package/src/cli.ts +0 -132
- package/src/indexer.ts +0 -148
- package/src/pdf.ts +0 -119
- package/src/query.ts +0 -132
- package/src/resolve-kb.ts +0 -19
- package/src/scan.ts +0 -59
- package/src/watcher.ts +0 -84
- package/tsconfig.json +0 -14
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// node_modules/@mariozechner/pi-ai/dist/providers/github-copilot-headers.js
|
|
2
|
+
function inferCopilotInitiator(messages) {
|
|
3
|
+
const last = messages[messages.length - 1];
|
|
4
|
+
return last && last.role !== "user" ? "agent" : "user";
|
|
5
|
+
}
|
|
6
|
+
function hasCopilotVisionInput(messages) {
|
|
7
|
+
return messages.some((msg) => {
|
|
8
|
+
if (msg.role === "user" && Array.isArray(msg.content)) {
|
|
9
|
+
return msg.content.some((c) => c.type === "image");
|
|
10
|
+
}
|
|
11
|
+
if (msg.role === "toolResult" && Array.isArray(msg.content)) {
|
|
12
|
+
return msg.content.some((c) => c.type === "image");
|
|
13
|
+
}
|
|
14
|
+
return false;
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function buildCopilotDynamicHeaders(params) {
|
|
18
|
+
const headers = {
|
|
19
|
+
"X-Initiator": inferCopilotInitiator(params.messages),
|
|
20
|
+
"Openai-Intent": "conversation-edits"
|
|
21
|
+
};
|
|
22
|
+
if (params.hasImages) {
|
|
23
|
+
headers["Copilot-Vision-Request"] = "true";
|
|
24
|
+
}
|
|
25
|
+
return headers;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export {
|
|
29
|
+
hasCopilotVisionInput,
|
|
30
|
+
buildCopilotDynamicHeaders
|
|
31
|
+
};
|