@kite-copilot/chat-panel 0.2.56 → 0.2.57
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/dist/auto.cjs +24 -1
- package/dist/auto.js +1 -1
- package/dist/{chunk-YTH7EUFD.js → chunk-FS6VPFSF.js} +24 -1
- package/dist/embed.global.js +32 -32
- package/dist/index.cjs +24 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/auto.cjs
CHANGED
|
@@ -2797,6 +2797,26 @@ ${imageMarkdown}` : imageMarkdown;
|
|
|
2797
2797
|
try {
|
|
2798
2798
|
const controller = new AbortController();
|
|
2799
2799
|
const timeoutId = setTimeout(() => controller.abort(), 6e4);
|
|
2800
|
+
let authToken;
|
|
2801
|
+
let authTokenType;
|
|
2802
|
+
if (getAuthHeaders) {
|
|
2803
|
+
try {
|
|
2804
|
+
const headers = await getAuthHeaders();
|
|
2805
|
+
const authHeader = headers["Authorization"] || headers["authorization"];
|
|
2806
|
+
if (authHeader) {
|
|
2807
|
+
const parts = authHeader.split(" ");
|
|
2808
|
+
if (parts.length === 2) {
|
|
2809
|
+
authTokenType = parts[0];
|
|
2810
|
+
authToken = parts[1];
|
|
2811
|
+
} else {
|
|
2812
|
+
authToken = authHeader;
|
|
2813
|
+
}
|
|
2814
|
+
console.log("[ChatPanel] Auth token obtained from getAuthHeaders");
|
|
2815
|
+
}
|
|
2816
|
+
} catch (e) {
|
|
2817
|
+
console.warn("[ChatPanel] Failed to get auth headers:", e);
|
|
2818
|
+
}
|
|
2819
|
+
}
|
|
2800
2820
|
const response = await fetch(`${agentUrl}/chat/stream`, {
|
|
2801
2821
|
method: "POST",
|
|
2802
2822
|
headers: {
|
|
@@ -2810,7 +2830,10 @@ ${imageMarkdown}` : imageMarkdown;
|
|
|
2810
2830
|
org_id: orgId,
|
|
2811
2831
|
user_name: userName,
|
|
2812
2832
|
user_email: userEmail,
|
|
2813
|
-
is_eval: isEval
|
|
2833
|
+
is_eval: isEval,
|
|
2834
|
+
auth_token: authToken,
|
|
2835
|
+
auth_token_type: authTokenType,
|
|
2836
|
+
product_backend_url: effectiveProductBackendUrl
|
|
2814
2837
|
}),
|
|
2815
2838
|
signal: controller.signal
|
|
2816
2839
|
});
|
package/dist/auto.js
CHANGED
|
@@ -2798,6 +2798,26 @@ ${imageMarkdown}` : imageMarkdown;
|
|
|
2798
2798
|
try {
|
|
2799
2799
|
const controller = new AbortController();
|
|
2800
2800
|
const timeoutId = setTimeout(() => controller.abort(), 6e4);
|
|
2801
|
+
let authToken;
|
|
2802
|
+
let authTokenType;
|
|
2803
|
+
if (getAuthHeaders) {
|
|
2804
|
+
try {
|
|
2805
|
+
const headers = await getAuthHeaders();
|
|
2806
|
+
const authHeader = headers["Authorization"] || headers["authorization"];
|
|
2807
|
+
if (authHeader) {
|
|
2808
|
+
const parts = authHeader.split(" ");
|
|
2809
|
+
if (parts.length === 2) {
|
|
2810
|
+
authTokenType = parts[0];
|
|
2811
|
+
authToken = parts[1];
|
|
2812
|
+
} else {
|
|
2813
|
+
authToken = authHeader;
|
|
2814
|
+
}
|
|
2815
|
+
console.log("[ChatPanel] Auth token obtained from getAuthHeaders");
|
|
2816
|
+
}
|
|
2817
|
+
} catch (e) {
|
|
2818
|
+
console.warn("[ChatPanel] Failed to get auth headers:", e);
|
|
2819
|
+
}
|
|
2820
|
+
}
|
|
2801
2821
|
const response = await fetch(`${agentUrl}/chat/stream`, {
|
|
2802
2822
|
method: "POST",
|
|
2803
2823
|
headers: {
|
|
@@ -2811,7 +2831,10 @@ ${imageMarkdown}` : imageMarkdown;
|
|
|
2811
2831
|
org_id: orgId,
|
|
2812
2832
|
user_name: userName,
|
|
2813
2833
|
user_email: userEmail,
|
|
2814
|
-
is_eval: isEval
|
|
2834
|
+
is_eval: isEval,
|
|
2835
|
+
auth_token: authToken,
|
|
2836
|
+
auth_token_type: authTokenType,
|
|
2837
|
+
product_backend_url: effectiveProductBackendUrl
|
|
2815
2838
|
}),
|
|
2816
2839
|
signal: controller.signal
|
|
2817
2840
|
});
|