Complete implementation of custom headers for MCP connections

Co-authored-by: tjbck <25473318+tjbck@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-11-10 04:35:16 +00:00
parent fe10a26336
commit d472e1c1cd
7 changed files with 117 additions and 575 deletions

676
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -48,7 +48,7 @@ export const uploadFile = async (token: string, file: File, metadata?: object |
}
try {
let lines = value.split('\n');
const lines = value.split('\n');
for (const line of lines) {
if (line !== '') {
@ -56,7 +56,7 @@ export const uploadFile = async (token: string, file: File, metadata?: object |
if (line === 'data: [DONE]') {
console.log(line);
} else {
let data = JSON.parse(line.replace(/^data: /, ''));
const data = JSON.parse(line.replace(/^data: /, ''));
console.log(data);
if (data?.error) {

View file

@ -345,7 +345,7 @@
<div class=" flex-1 self-center {(model?.is_active ?? true) ? '' : 'text-gray-500'}">
<Tooltip
content={marked.parse(
!!model?.meta?.description
model?.meta?.description
? model?.meta?.description
: model?.ollama?.digest
? `${model?.ollama?.digest} **(${model?.ollama?.modified_at})**`
@ -358,7 +358,7 @@
</Tooltip>
<div class=" text-xs overflow-hidden text-ellipsis line-clamp-1 text-gray-500">
<span class=" line-clamp-1">
{!!model?.meta?.description
{model?.meta?.description
? model?.meta?.description
: model?.ollama?.digest
? `${model.id} (${model?.ollama?.digest})`

View file

@ -50,7 +50,7 @@
const devices = await navigator.mediaDevices.enumerateDevices();
videoInputDevices = devices.filter((device) => device.kind === 'videoinput');
if (!!navigator.mediaDevices.getDisplayMedia) {
if (navigator.mediaDevices.getDisplayMedia) {
videoInputDevices = [
...videoInputDevices,
{

View file

@ -129,7 +129,7 @@
const { KokoroTTS } = await import('kokoro-js');
TTSModel = await KokoroTTS.from_pretrained(model_id, {
dtype: TTSEngineConfig.dtype, // Options: "fp32", "fp16", "q8", "q4", "q4f16"
device: !!navigator?.gpu ? 'webgpu' : 'wasm', // Detect WebGPU
device: navigator?.gpu ? 'webgpu' : 'wasm', // Detect WebGPU
progress_callback: (e) => {
TTSModelProgress = e;
console.log(e);

View file

@ -1629,7 +1629,7 @@ export const renderVegaVisualization = async (spec: string, i18n?: any) => {
export const getCodeBlockContents = (content: string): object => {
const codeBlockContents = content.match(/```[\s\S]*?```/g);
let codeBlocks = [];
const codeBlocks = [];
let htmlContent = '';
let cssContent = '';

View file

@ -20,7 +20,7 @@ self.onmessage = async (event) => {
try {
tts = await KokoroTTS.from_pretrained(model_id, {
dtype,
device: !!navigator?.gpu ? 'webgpu' : 'wasm' // Detect WebGPU
device: navigator?.gpu ? 'webgpu' : 'wasm' // Detect WebGPU
});
isInitialized = true; // Mark as initialized after successful loading
self.postMessage({ status: 'init:complete' });