@sourcegraph/cody-web 0.35.0 → 0.37.0

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.
@@ -0,0 +1,1055 @@
1
+ import { O as Ollama$1, c as contextFiltersProvider, C as CompletionStopReason, M as ModelUsage, e as enableMapSet } from "./agent.worker-DKy-Dvsz.mjs";
2
+ import { A, B, k, R, au, D, E, F, an, w, x, a9, aw, N, y, v, P, G, U, z, L, Q, S, ab, W, Y, T, _, a5, ad, a6, a, d, a7, aq, a3, ao, aA, q, a1, n, am, ap, $, av, l, f, g, a0, o, X, ar, as, h, i, a8, a4, ac, m, aa, H, u, at, r, p, ae, al, aj, af, ah, ak, ai, ag, s, az, ay, ax, a2, V, t, j, Z, K, J, I } from "./agent.worker-DKy-Dvsz.mjs";
3
+ import { i as isAbortError, a as isError, b as isDefined, M as ModelTag, c as URI, d as isWindows } from "./vscode-shim-CqAb7AbA.mjs";
4
+ import { bB, bD, bC, bV, ai as ai2, aj as aj2, ak as ak2, al as al2, bN, bP, db, b5, e, c3, bQ, bU, bT, C, g as g2, af as af2, ah as ah2, D as D2, h as h2, cq, aG, bS, bR, am as am2, bO, aY, F as F2, a2 as a22, G as G2, b4, b6, aK, a6 as a62, a5 as a52, I as I2, aF, an as an2, L as L2, aL, cr, cv, N as N2, ao as ao2, ap as ap2, aM, P as P2, aH, bE, b2, b1, b0, b8, aq as aq2, S as S2, aZ, aC, c4, aN, ar as ar2, as as as2, dl, dk, b3, cT, bM, aa as aa2, ae as ae2, ba, bw, cl, H as H2, aP, de, cU, dc, d7, ct, cQ, cR, cb, ca, bZ, aQ, cz, cd, bf, a4 as a42, bc, bb, aR, df, dg, dh, b7, d5, cP, j as j2, B as B2, cW, bm, bh, c6, m as m2, T as T2, W as W2, Y as Y2, V as V2, Z as Z2, n as n2, cf, cy, cF, c2, c1, o as o2, x as x2, bA, a3 as a32, bI, cX, b$, cE, di, d1, ci, $ as $2, a0 as a02, cp, cw, bv, bL, ac as ac2, ab as ab2, bq, bo, bp, c9, by, bJ, aD, a1 as a12, b_, at as at2, au as au2, av as av2, aw as aw2, aJ, ag as ag2, k as k2, J as J2, ax as ax2, E as E2, y as y2, ay as ay2, az as az2, aA as aA2, aE, aB, bi, bd, c7, c8, bH, be, q as q2, u as u2, cS, a7 as a72, a8 as a82, bx, v as v2, cu, aW, cs, cM, dj, da, d6, aS, aO, cg, ch, bn, aX, a$, aU, bk, A as A2, c_, cB, cA, l as l2, z as z2, cI, aT, co, cn, b9, bF, bG, cm, bz, r as r2, d4, cZ, bl, bj, aV, bg, c5, bY, bX, dd, d8, ad as ad2, _ as _2, d9, aI, a9 as a92, a_, d2, d3, cC, cL, d0, cJ, cO, ce, cN, c$, cK, cD, cG, cH, bs, br, cc, cY, c0, cj, bK, t as t2, bW, bu, bt, K as K2, O, Q as Q2, X as X2, R as R2, cx, ck, f as f2, cV, w as w2 } from "./vscode-shim-CqAb7AbA.mjs";
5
+ function createOllamaClient(ollamaOptions, logger, logDebug) {
6
+ async function* complete(params, abortController) {
7
+ const url = new URL(ollamaOptions.url).href;
8
+ const ollama = new Ollama$1({ host: url });
9
+ const model = params.model;
10
+ const log = logger == null ? void 0 : logger.startCompletion(params, url);
11
+ const { signal } = abortController;
12
+ try {
13
+ const prompt = await params.prompt.toFilteredString(contextFiltersProvider);
14
+ const res = await ollama.generate({
15
+ model,
16
+ prompt,
17
+ options: params.options,
18
+ stream: true
19
+ });
20
+ const completionResponse = {
21
+ completion: "",
22
+ stopReason: CompletionStopReason.StreamingChunk
23
+ };
24
+ for await (const line of res) {
25
+ if (line.response) {
26
+ completionResponse.completion += line.response;
27
+ yield {
28
+ completionResponse
29
+ };
30
+ }
31
+ if (signal == null ? void 0 : signal.aborted) {
32
+ completionResponse.stopReason = CompletionStopReason.RequestAborted;
33
+ ollama.abort();
34
+ break;
35
+ }
36
+ if (line.done) {
37
+ completionResponse.stopReason = CompletionStopReason.RequestFinished;
38
+ if (line.total_duration) {
39
+ const timingInfo = formatOllamaTimingInfo(line);
40
+ logDebug == null ? void 0 : logDebug("ollama", "generation done", timingInfo.join(" "));
41
+ }
42
+ }
43
+ }
44
+ completionResponse.stopReason = CompletionStopReason.RequestFinished;
45
+ log == null ? void 0 : log.onComplete(completionResponse);
46
+ yield { completionResponse };
47
+ return;
48
+ } catch (error) {
49
+ if (!isAbortError(error) && isError(error)) {
50
+ log == null ? void 0 : log.onError(error.message, error);
51
+ }
52
+ throw error;
53
+ }
54
+ }
55
+ return {
56
+ complete,
57
+ logger
58
+ };
59
+ }
60
+ function formatOllamaTimingInfo(response) {
61
+ const timingMetricsKeys = [
62
+ "total_duration",
63
+ "load_duration",
64
+ "prompt_eval_count",
65
+ "prompt_eval_duration",
66
+ "eval_count",
67
+ "eval_duration",
68
+ "sample_count",
69
+ "sample_duration"
70
+ ];
71
+ const formattedMetrics = timingMetricsKeys.filter((key) => response[key] !== void 0).map((key) => {
72
+ const value = response[key];
73
+ const formattedValue = key.endsWith("_duration") ? `${value / 1e6}ms` : value;
74
+ return `${key}=${formattedValue}`;
75
+ });
76
+ const promptEvalSpeed = response.prompt_eval_count !== void 0 && response.prompt_eval_duration !== void 0 ? `prompt_eval_tok/sec=${response.prompt_eval_count / (response.prompt_eval_duration / 1e9)}` : null;
77
+ const responseEvalSpeed = response.eval_count !== void 0 && response.eval_duration !== void 0 ? `response_tok/sec=${response.eval_count / (response.eval_duration / 1e9)}` : null;
78
+ return [...formattedMetrics, promptEvalSpeed, responseEvalSpeed].filter(isDefined);
79
+ }
80
+ [
81
+ {
82
+ id: "groq/deepseek-r1-distill-qwen-14b@4bit",
83
+ modelRef: {
84
+ providerId: "groq",
85
+ apiVersionId: "unknown",
86
+ modelId: "deepseek r1 distill qwen 14b@4bit"
87
+ },
88
+ usage: [ModelUsage.Chat, ModelUsage.Edit],
89
+ contextWindow: {
90
+ input: 128e3,
91
+ output: 8192
92
+ },
93
+ clientSideConfig: {
94
+ apiKey: void 0,
95
+ apiEndpoint: "http://127.0.0.1:1234/v1/chat/completions",
96
+ options: {
97
+ temperature: 0.1
98
+ }
99
+ },
100
+ tags: [ModelTag.Local, ModelTag.BYOK, ModelTag.Experimental],
101
+ provider: "groq",
102
+ title: "deepseek r1 distill qwen 14b@4bit"
103
+ },
104
+ {
105
+ id: "ollama/gemma3:1b",
106
+ modelRef: {
107
+ providerId: "Ollama",
108
+ apiVersionId: "unknown",
109
+ modelId: "gemma3:1b"
110
+ },
111
+ usage: [ModelUsage.Chat, ModelUsage.Edit],
112
+ contextWindow: {
113
+ input: 2048,
114
+ output: 4e3
115
+ },
116
+ clientSideConfig: void 0,
117
+ tags: [ModelTag.Local, ModelTag.BYOK, ModelTag.Experimental],
118
+ provider: "Ollama",
119
+ title: "gemma3:1b"
120
+ },
121
+ {
122
+ id: "groq/meta-llama/llama-4-instruct",
123
+ modelRef: {
124
+ providerId: "groq",
125
+ apiVersionId: "unknown",
126
+ modelId: "llama 4 scout instruct"
127
+ },
128
+ usage: [ModelUsage.Chat, ModelUsage.Edit],
129
+ contextWindow: {
130
+ input: 40960,
131
+ output: 8192
132
+ },
133
+ clientSideConfig: {
134
+ apiKey: "",
135
+ apiEndpoint: void 0,
136
+ options: {
137
+ temperature: 0.1
138
+ }
139
+ },
140
+ tags: [ModelTag.Local, ModelTag.BYOK, ModelTag.Experimental],
141
+ provider: "groq",
142
+ title: "llama 4 scout instruct"
143
+ }
144
+ ];
145
+ const FIXTURE_MODELS = [
146
+ {
147
+ id: "anthropic::2024-10-22::claude-3-5-sonnet-latest",
148
+ modelRef: {
149
+ providerId: "anthropic",
150
+ apiVersionId: "2024-10-22",
151
+ modelId: "claude-3-5-sonnet-latest"
152
+ },
153
+ usage: [ModelUsage.Edit, ModelUsage.Chat],
154
+ contextWindow: {
155
+ input: 15e3,
156
+ output: 4e3,
157
+ context: {
158
+ user: 3e4
159
+ }
160
+ },
161
+ tags: [ModelTag.Free, ModelTag.Balanced],
162
+ provider: "anthropic",
163
+ title: "Claude 3.5 Sonnet"
164
+ },
165
+ {
166
+ id: "anthropic::2023-06-01::claude-3-opus",
167
+ modelRef: {
168
+ providerId: "anthropic",
169
+ apiVersionId: "2023-06-01",
170
+ modelId: "claude-3-opus"
171
+ },
172
+ usage: [ModelUsage.Edit, ModelUsage.Chat],
173
+ contextWindow: {
174
+ input: 15e3,
175
+ output: 4e3,
176
+ context: {
177
+ user: 3e4
178
+ }
179
+ },
180
+ tags: [ModelTag.Pro, ModelTag.Other],
181
+ provider: "anthropic",
182
+ title: "Claude 3 Opus"
183
+ },
184
+ {
185
+ id: "anthropic::2023-06-01::claude-3-haiku",
186
+ modelRef: {
187
+ providerId: "anthropic",
188
+ apiVersionId: "2023-06-01",
189
+ modelId: "claude-3-haiku"
190
+ },
191
+ usage: [ModelUsage.Edit, ModelUsage.Chat],
192
+ contextWindow: {
193
+ input: 7e3,
194
+ output: 4e3
195
+ },
196
+ tags: [ModelTag.Free, ModelTag.Speed],
197
+ provider: "anthropic",
198
+ title: "Claude 3 Haiku"
199
+ },
200
+ {
201
+ id: "fireworks::v1::starcoder",
202
+ modelRef: {
203
+ providerId: "fireworks",
204
+ apiVersionId: "v1",
205
+ modelId: "starcoder"
206
+ },
207
+ usage: [ModelUsage.Autocomplete],
208
+ contextWindow: {
209
+ input: 2048,
210
+ output: 256
211
+ },
212
+ tags: [ModelTag.Pro, ModelTag.Speed],
213
+ provider: "fireworks",
214
+ title: "StarCoder"
215
+ },
216
+ {
217
+ id: "fireworks::v1::deepseek-coder-v2-lite-base",
218
+ modelRef: {
219
+ providerId: "fireworks",
220
+ apiVersionId: "v1",
221
+ modelId: "deepseek-coder-v2-lite-base"
222
+ },
223
+ usage: [ModelUsage.Autocomplete],
224
+ contextWindow: {
225
+ input: 2048,
226
+ output: 256
227
+ },
228
+ tags: [ModelTag.Pro, ModelTag.Speed],
229
+ provider: "fireworks",
230
+ title: "DeepSeek V2 Lite Base"
231
+ },
232
+ {
233
+ id: "google::v1::gemini-1.5-pro",
234
+ modelRef: {
235
+ providerId: "google",
236
+ apiVersionId: "v1",
237
+ modelId: "gemini-1.5-pro"
238
+ },
239
+ usage: [ModelUsage.Edit, ModelUsage.Chat],
240
+ contextWindow: {
241
+ input: 15e3,
242
+ output: 4e3,
243
+ context: {
244
+ user: 3e4
245
+ }
246
+ },
247
+ tags: [ModelTag.Free, ModelTag.Balanced],
248
+ provider: "google",
249
+ title: "Gemini 1.5 Pro"
250
+ },
251
+ {
252
+ id: "google::v1::gemini-1.5-flash",
253
+ modelRef: {
254
+ providerId: "google",
255
+ apiVersionId: "v1",
256
+ modelId: "gemini-1.5-flash"
257
+ },
258
+ usage: [ModelUsage.Edit, ModelUsage.Chat],
259
+ contextWindow: {
260
+ input: 15e3,
261
+ output: 4e3,
262
+ context: {
263
+ user: 3e4
264
+ }
265
+ },
266
+ tags: [ModelTag.Free, ModelTag.Speed],
267
+ provider: "google",
268
+ title: "Gemini 1.5 Flash"
269
+ },
270
+ {
271
+ id: "openai::2024-02-01::gpt-4o",
272
+ modelRef: {
273
+ providerId: "openai",
274
+ apiVersionId: "2024-02-01",
275
+ modelId: "gpt-4o"
276
+ },
277
+ usage: [ModelUsage.Edit, ModelUsage.Chat],
278
+ contextWindow: {
279
+ input: 15e3,
280
+ output: 4e3,
281
+ context: {
282
+ user: 3e4
283
+ }
284
+ },
285
+ tags: [ModelTag.Pro, ModelTag.Balanced],
286
+ provider: "openai",
287
+ title: "GPT-4o"
288
+ }
289
+ ];
290
+ class NoopEditor {
291
+ getWorkspaceRootUri() {
292
+ return null;
293
+ }
294
+ getActiveTextEditor() {
295
+ return null;
296
+ }
297
+ getActiveTextEditorSelection() {
298
+ return null;
299
+ }
300
+ getActiveTextEditorDiagnosticsForRange() {
301
+ return null;
302
+ }
303
+ getActiveTextEditorVisibleContent() {
304
+ return null;
305
+ }
306
+ getTextEditorContentForFile(_uri, _range) {
307
+ return Promise.reject(new Error("NoopEditor: no file content available"));
308
+ }
309
+ showWarningMessage(_message) {
310
+ return Promise.resolve();
311
+ }
312
+ }
313
+ function testFileUri(relativePath) {
314
+ return URI.file(isWindows() ? `c:\\${relativePath.replaceAll("/", "\\")}` : `/${relativePath}`);
315
+ }
316
+ const FILE_MENTION_EDITOR_STATE_FIXTURE = {
317
+ v: "lexical-v0",
318
+ minReaderV: "lexical-v0",
319
+ lexicalEditorState: {
320
+ root: {
321
+ children: [
322
+ {
323
+ children: [
324
+ {
325
+ detail: 0,
326
+ format: 0,
327
+ mode: "normal",
328
+ style: "",
329
+ text: "What does ",
330
+ type: "text",
331
+ version: 1
332
+ },
333
+ {
334
+ type: "contextItemMention",
335
+ version: 1,
336
+ contextItem: {
337
+ type: "symbol",
338
+ uri: testFileUri("a/b/file1.go").toString(),
339
+ range: {
340
+ start: {
341
+ line: 2,
342
+ character: 13
343
+ },
344
+ end: {
345
+ line: 4,
346
+ character: 1
347
+ }
348
+ },
349
+ symbolName: "Symbol1",
350
+ kind: "function"
351
+ },
352
+ isFromInitialContext: false,
353
+ text: "Symbol1"
354
+ },
355
+ {
356
+ detail: 0,
357
+ format: 0,
358
+ mode: "normal",
359
+ style: "",
360
+ text: " in ",
361
+ type: "text",
362
+ version: 1
363
+ },
364
+ {
365
+ type: "contextItemMention",
366
+ version: 1,
367
+ contextItem: {
368
+ type: "file",
369
+ uri: testFileUri("dir/dir/file-a-1.py").toString()
370
+ },
371
+ isFromInitialContext: false,
372
+ text: "file-a-1.py"
373
+ },
374
+ {
375
+ detail: 0,
376
+ format: 0,
377
+ mode: "normal",
378
+ style: "",
379
+ text: " do? Also use ",
380
+ type: "text",
381
+ version: 1
382
+ },
383
+ {
384
+ type: "contextItemMention",
385
+ version: 1,
386
+ contextItem: {
387
+ type: "file",
388
+ uri: testFileUri("dir/dir/README.md").toString(),
389
+ range: {
390
+ start: {
391
+ line: 1,
392
+ character: 0
393
+ },
394
+ end: {
395
+ line: 8,
396
+ character: 0
397
+ }
398
+ }
399
+ },
400
+ isFromInitialContext: false,
401
+ text: "README.md:2-8"
402
+ },
403
+ {
404
+ detail: 0,
405
+ format: 0,
406
+ mode: "normal",
407
+ style: "",
408
+ text: ".",
409
+ type: "text",
410
+ version: 1
411
+ }
412
+ ],
413
+ direction: "ltr",
414
+ format: "",
415
+ indent: 0,
416
+ type: "paragraph",
417
+ version: 1
418
+ }
419
+ ],
420
+ direction: "ltr",
421
+ format: "",
422
+ indent: 0,
423
+ type: "root",
424
+ version: 1
425
+ }
426
+ }
427
+ };
428
+ ({
429
+ v: "lexical-v1",
430
+ minReaderV: "lexical-v1",
431
+ lexicalEditorState: {
432
+ root: {
433
+ direction: null,
434
+ format: "",
435
+ indent: 0,
436
+ type: "root",
437
+ version: 1,
438
+ children: [
439
+ {
440
+ direction: null,
441
+ format: "",
442
+ indent: 0,
443
+ type: "paragraph",
444
+ version: 1,
445
+ children: [
446
+ {
447
+ detail: 0,
448
+ format: 0,
449
+ mode: "normal",
450
+ style: "",
451
+ type: "text",
452
+ version: 1,
453
+ text: "Your task is to generate a suit of multiple unit tests for the functions defined inside the "
454
+ },
455
+ {
456
+ type: "contextItemMention",
457
+ contextItem: {
458
+ type: "file",
459
+ uri: testFileUri("a/b/file1.go").toString(),
460
+ source: "user"
461
+ },
462
+ text: "file1.go",
463
+ isFromInitialContext: false,
464
+ version: 1
465
+ },
466
+ {
467
+ detail: 0,
468
+ format: 0,
469
+ mode: "normal",
470
+ style: "",
471
+ type: "text",
472
+ version: 1,
473
+ text: " file.\n\nUse the "
474
+ },
475
+ {
476
+ type: "templateInput",
477
+ templateInput: {
478
+ placeholder: "mention the testing framework"
479
+ },
480
+ version: 1
481
+ },
482
+ {
483
+ detail: 0,
484
+ format: 0,
485
+ mode: "normal",
486
+ style: "",
487
+ type: "text",
488
+ version: 1,
489
+ text: " framework to generate the unit tests. Follow the example tests from the "
490
+ },
491
+ {
492
+ type: "templateInput",
493
+ templateInput: {
494
+ placeholder: "mention an example test file"
495
+ },
496
+ version: 1
497
+ },
498
+ {
499
+ detail: 0,
500
+ format: 0,
501
+ mode: "normal",
502
+ style: "",
503
+ type: "text",
504
+ version: 1,
505
+ text: " test file. Include unit tests for the following cases: "
506
+ },
507
+ {
508
+ type: "templateInput",
509
+ templateInput: {
510
+ placeholder: "list test cases"
511
+ },
512
+ version: 1
513
+ },
514
+ {
515
+ detail: 0,
516
+ format: 0,
517
+ mode: "normal",
518
+ style: "",
519
+ type: "text",
520
+ version: 1,
521
+ text: ".\n\nEnsure that the unit tests cover all the edge cases and validate the expected functionality of the functions"
522
+ }
523
+ ]
524
+ }
525
+ ]
526
+ }
527
+ }
528
+ });
529
+ const OLD_TEXT_FILE_MENTION_EDITOR_STATE_FIXTURE = {
530
+ v: "lexical-v0",
531
+ minReaderV: "lexical-v0",
532
+ lexicalEditorState: {
533
+ root: {
534
+ children: [
535
+ {
536
+ children: [
537
+ {
538
+ detail: 0,
539
+ format: 0,
540
+ mode: "normal",
541
+ style: "",
542
+ text: "What does ",
543
+ type: "text",
544
+ version: 1
545
+ },
546
+ {
547
+ detail: 1,
548
+ format: 0,
549
+ mode: "token",
550
+ style: "",
551
+ text: "@Symbol1",
552
+ type: "contextItemMention",
553
+ version: 1,
554
+ contextItem: {
555
+ type: "symbol",
556
+ uri: testFileUri("a/b/file1.go").toString(),
557
+ range: {
558
+ start: {
559
+ line: 2,
560
+ character: 13
561
+ },
562
+ end: {
563
+ line: 4,
564
+ character: 1
565
+ }
566
+ },
567
+ symbolName: "Symbol1",
568
+ kind: "function"
569
+ },
570
+ isFromInitialContext: false
571
+ },
572
+ {
573
+ detail: 0,
574
+ format: 0,
575
+ mode: "normal",
576
+ style: "",
577
+ text: " in ",
578
+ type: "text",
579
+ version: 1
580
+ },
581
+ {
582
+ detail: 1,
583
+ format: 0,
584
+ mode: "token",
585
+ style: "",
586
+ text: "@file-a-1.py",
587
+ type: "contextItemMention",
588
+ version: 1,
589
+ contextItem: {
590
+ type: "file",
591
+ uri: testFileUri("dir/dir/file-a-1.py").toString()
592
+ },
593
+ isFromInitialContext: false
594
+ },
595
+ {
596
+ detail: 0,
597
+ format: 0,
598
+ mode: "normal",
599
+ style: "",
600
+ text: " do? Also use ",
601
+ type: "text",
602
+ version: 1
603
+ },
604
+ {
605
+ detail: 1,
606
+ format: 0,
607
+ mode: "token",
608
+ style: "",
609
+ text: "@README.md:2-8",
610
+ type: "contextItemMention",
611
+ version: 1,
612
+ contextItem: {
613
+ type: "file",
614
+ uri: testFileUri("dir/dir/README.md").toString(),
615
+ range: {
616
+ start: {
617
+ line: 1,
618
+ character: 0
619
+ },
620
+ end: {
621
+ line: 8,
622
+ character: 0
623
+ }
624
+ }
625
+ },
626
+ isFromInitialContext: false
627
+ },
628
+ {
629
+ detail: 0,
630
+ format: 0,
631
+ mode: "normal",
632
+ style: "",
633
+ text: ".",
634
+ type: "text",
635
+ version: 1
636
+ }
637
+ ],
638
+ direction: "ltr",
639
+ format: "",
640
+ indent: 0,
641
+ type: "paragraph",
642
+ version: 1
643
+ }
644
+ ],
645
+ direction: "ltr",
646
+ format: "",
647
+ indent: 0,
648
+ type: "root",
649
+ version: 1
650
+ }
651
+ }
652
+ };
653
+ const UNKNOWN_NODES_EDITOR_STATE_FIXTURE = {
654
+ v: "lexical-v0",
655
+ minReaderV: "lexical-v0",
656
+ lexicalEditorState: {
657
+ root: {
658
+ children: [
659
+ {
660
+ children: [
661
+ {
662
+ detail: 0,
663
+ format: 0,
664
+ mode: "normal",
665
+ style: "",
666
+ text: "What is ",
667
+ type: "text",
668
+ version: 1
669
+ },
670
+ {
671
+ type: "unknownNode",
672
+ version: 1,
673
+ foo: "bar",
674
+ // The unknownNode has `text`, which makes it backwards compatible.
675
+ // Unrecognized nodes are treated as text nodes.
676
+ text: "unknown-node-content-foo"
677
+ }
678
+ ],
679
+ direction: "ltr",
680
+ format: "",
681
+ indent: 0,
682
+ type: "paragraph",
683
+ version: 1
684
+ }
685
+ ],
686
+ direction: "ltr",
687
+ format: "",
688
+ indent: 0,
689
+ type: "root",
690
+ version: 1
691
+ }
692
+ }
693
+ };
694
+ enableMapSet();
695
+ export {
696
+ A as ANSWER_TOKENS,
697
+ bB as AUTH_STATUS_FIXTURE_AUTHED,
698
+ bD as AUTH_STATUS_FIXTURE_AUTHED_DOTCOM,
699
+ bC as AUTH_STATUS_FIXTURE_UNAUTHED,
700
+ bV as AUTOCOMPLETE_PROVIDER_ID,
701
+ ai2 as AbortError,
702
+ aj2 as AuthConfigError,
703
+ ak2 as AuthError,
704
+ al2 as AvailabilityError,
705
+ B as BotResponseMultiplexer,
706
+ bN as CHAT_INPUT_TOKEN_BUDGET,
707
+ bP as CHAT_OUTPUT_TOKEN_BUDGET,
708
+ db as CLIENT_CAPABILITIES_FIXTURE,
709
+ b5 as CODE_SEARCH_PROVIDER_URI,
710
+ e as CODY_PASSTHROUGH_VSCODE_OPEN_COMMAND_ID,
711
+ c3 as CONTEXT_ITEM_MENTION_NODE_TYPE,
712
+ bQ as CORPUS_CONTEXT_ALLOCATION,
713
+ k as ChatClient,
714
+ R as ClientConfigSingleton,
715
+ bU as CodyAutoSuggestionMode,
716
+ bT as CodyIDE,
717
+ CompletionStopReason,
718
+ au as ContextFiltersProvider,
719
+ C as ContextItemSource,
720
+ g2 as CustomCommandType,
721
+ D as DEFAULT_EVENT_SOURCE,
722
+ af2 as DOTCOM_URL,
723
+ ah2 as DOTCOM_WORKSPACE_UPGRADE_URL,
724
+ D2 as DefaultChatCommands,
725
+ h2 as DefaultEditCommands,
726
+ cq as EMPTY,
727
+ aG as EXCLUDE_EVERYTHING_CONTEXT_FILTERS,
728
+ bS as EXTENDED_CHAT_INPUT_TOKEN_BUDGET,
729
+ bR as EXTENDED_USER_CONTEXT_TOKEN_BUDGET,
730
+ E as EventSourceTelemetryMetadataMapping,
731
+ am2 as ExternalAuthProviderError,
732
+ bO as FAST_CHAT_INPUT_TOKEN_BUDGET,
733
+ aY as FILE_CONTEXT_MENTION_PROVIDER,
734
+ FILE_MENTION_EDITOR_STATE_FIXTURE,
735
+ F2 as FILE_RANGE_TOOLTIP_LABEL,
736
+ F as FIXTURE_MODEL,
737
+ FIXTURE_MODELS,
738
+ a22 as FeatureFlag,
739
+ G2 as GENERAL_HELP_LABEL,
740
+ b4 as GIT_OPENCTX_PROVIDER_URI,
741
+ b6 as GLOBAL_SEARCH_PROVIDER_URI,
742
+ aK as GraphQLTelemetryExporter,
743
+ a62 as GuardrailsCheckStatus,
744
+ a52 as GuardrailsMode,
745
+ I2 as IGNORED_FILE_WARNING_LABEL,
746
+ aF as INCLUDE_EVERYTHING_CONTEXT_FILTERS,
747
+ an2 as InvalidAccessTokenError,
748
+ an as InvisibleStatusBarTag,
749
+ L2 as LARGE_FILE_WARNING_LABEL,
750
+ w as MAX_BYTES_PER_FILE,
751
+ x as MAX_CURRENT_FILE_TOKENS,
752
+ aL as MockServerTelemetryRecorderProvider,
753
+ ModelTag,
754
+ ModelUsage,
755
+ a9 as ModelsService,
756
+ aw as Mutable,
757
+ cr as NEVER,
758
+ cv as NO_INITIAL_VALUE,
759
+ N2 as NO_SYMBOL_MATCHES_HELP_LABEL,
760
+ N as NUM_CODE_RESULTS,
761
+ y as NUM_TEXT_RESULTS,
762
+ ao2 as NeedsAuthChallengeError,
763
+ ap2 as NetworkError,
764
+ aM as NoOpTelemetryRecorderProvider,
765
+ NoopEditor,
766
+ OLD_TEXT_FILE_MENTION_EDITOR_STATE_FIXTURE,
767
+ v as OLLAMA_DEFAULT_URL,
768
+ P as ProcessType,
769
+ P2 as ProgrammingLanguage,
770
+ G as PromptMixin,
771
+ aH as PromptMode,
772
+ bE as PromptString,
773
+ b2 as REMOTE_DIRECTORY_PROVIDER_URI,
774
+ b1 as REMOTE_FILE_PROVIDER_URI,
775
+ b0 as REMOTE_REPOSITORY_PROVIDER_URI,
776
+ b8 as RULES_PROVIDER_URI,
777
+ aq2 as RateLimitError,
778
+ U as RestClient,
779
+ S2 as SUPPORTED_URI_SCHEMAS,
780
+ z as SURROUNDING_LINES,
781
+ aZ as SYMBOL_CONTEXT_MENTION_PROVIDER,
782
+ L as SourcegraphBrowserCompletionsClient,
783
+ Q as SourcegraphCompletionsClient,
784
+ aC as SourcegraphGraphQLAPIClient,
785
+ S as SourcegraphGuardrailsClient,
786
+ c4 as TEMPLATE_INPUT_NODE_TYPE,
787
+ aN as TelemetryRecorderProvider,
788
+ ab as TestLocalStorageForModelPreferences,
789
+ ar2 as TimeoutError,
790
+ W as TokenCounter,
791
+ Y as TokenCounterUtils,
792
+ as2 as TracedError,
793
+ T as Typewriter,
794
+ dl as UITerminalOutputType,
795
+ dk as UIToolStatus,
796
+ UNKNOWN_NODES_EDITOR_STATE_FIXTURE,
797
+ b3 as WEB_PROVIDER_URI,
798
+ cT as abortableOperation,
799
+ bM as addAuthHeaders,
800
+ aa2 as addClientInfoParams,
801
+ ae2 as addCodyClientIdentificationHeaders,
802
+ ba as addMessageListenersForExtensionAPI,
803
+ bw as addTraceparent,
804
+ cl as allValuesFrom,
805
+ H2 as assertFileURI,
806
+ aP as assertUnreachable,
807
+ de as authStatus,
808
+ cU as catchError,
809
+ dc as cenv,
810
+ _ as charsToTokens,
811
+ a5 as checkVersion,
812
+ d7 as clientCapabilities,
813
+ ad as codyPaths,
814
+ ct as combineLatest,
815
+ cQ as concat,
816
+ cR as concatMap,
817
+ a6 as configOverwrites,
818
+ contextFiltersProvider,
819
+ cb as contextItemMentionNodeDisplayText,
820
+ ca as contextItemMentionNodePromptText,
821
+ bZ as contextItemsFromPromptEditorValue,
822
+ aQ as convertGitCloneURLToCodebaseName,
823
+ cz as createDisposables,
824
+ cd as createExtensionAPI,
825
+ bf as createGitDiff,
826
+ a42 as createGuardrailsImpl,
827
+ bc as createMessageAPIForExtension,
828
+ bb as createMessageAPIForWebview,
829
+ a as createModel,
830
+ d as createModelFromServerModel,
831
+ createOllamaClient,
832
+ a7 as createRuleService,
833
+ aq as createSSEIterator,
834
+ aR as createSubscriber,
835
+ df as currentAuthStatus,
836
+ dg as currentAuthStatusAuthed,
837
+ dh as currentAuthStatusOrNotReadyYet,
838
+ b7 as currentOpenCtxController,
839
+ d5 as currentResolvedConfig,
840
+ a3 as currentSiteVersion,
841
+ cP as debounceTime,
842
+ j2 as dedupeWith,
843
+ B2 as defaultPathFunctions,
844
+ cW as defer,
845
+ bm as dependentAbortController,
846
+ bh as deserialize,
847
+ c6 as deserializeContextItem,
848
+ m2 as displayLineRange,
849
+ T2 as displayPath,
850
+ W2 as displayPathBasename,
851
+ Y2 as displayPathDirname,
852
+ V2 as displayPathWithLines,
853
+ Z2 as displayPathWithoutWorkspaceFolderPrefix,
854
+ n2 as displayRange,
855
+ cf as disposableSubscription,
856
+ cy as disposeOnUnsubscribe,
857
+ cF as distinctUntilChanged,
858
+ ao as dotcomTokenToGatewayToken,
859
+ c2 as editorStateFromPromptString,
860
+ c1 as editorStateToText,
861
+ aA as editorWindowIsFocused,
862
+ q as errorToChatError,
863
+ o2 as expandToLineRange,
864
+ x2 as extensionForLanguage,
865
+ bA as extractContextFromTraceparent,
866
+ a32 as featureFlagProvider,
867
+ bI as fetch,
868
+ a1 as fetchLocalOllamaModels,
869
+ cX as filter,
870
+ b$ as filterContextItemsFromPromptEditorValue,
871
+ cE as finalize,
872
+ di as firstNonPendingAuthStatus,
873
+ d1 as firstResultFromOperation,
874
+ ci as firstValueFrom,
875
+ $2 as fixPathSep,
876
+ a02 as forceHydration,
877
+ cp as fromLateSetSource,
878
+ cw as fromVSCodeEvent,
879
+ bv as getActiveTraceAndSpanId,
880
+ bL as getAuthHeaders,
881
+ n as getChatPreamble,
882
+ ac2 as getClientIdentificationHeaders,
883
+ ab2 as getClientInfoParams,
884
+ am as getClientPromptString,
885
+ ap as getCodyAuthReferralCode,
886
+ $ as getCompletionsModelConfig,
887
+ av as getContextForChatMessage,
888
+ l as getDefaultSystemPrompt,
889
+ bq as getEditorIndentString,
890
+ bo as getEditorInsertSpaces,
891
+ bp as getEditorTabSize,
892
+ c9 as getMentionOperations,
893
+ f as getModelInfo,
894
+ g as getProviderName,
895
+ a0 as getSerializedParams,
896
+ o as getSimplePreamble,
897
+ X as getTokenCounterUtils,
898
+ by as getTraceparentHeaders,
899
+ bJ as globalAgentRef,
900
+ ar as googleChatClient,
901
+ aD as graphqlClient,
902
+ as as groqChatClient,
903
+ h as handleRateLimitError,
904
+ a12 as hydrateAfterPostMessage,
905
+ b_ as inputTextWithoutContextChipsFromPromptEditorState,
906
+ isAbortError,
907
+ at2 as isAbortErrorOrSocketHangUp,
908
+ au2 as isAuthError,
909
+ av2 as isAvailabilityError,
910
+ aw2 as isContextWindowLimitError,
911
+ aJ as isCustomAuthChallengeResponse,
912
+ i as isCustomModel,
913
+ isDefined,
914
+ ag2 as isDotCom,
915
+ isError,
916
+ k2 as isErrorLike,
917
+ J2 as isFileURI,
918
+ ax2 as isInvalidAccessTokenError,
919
+ E2 as isMacOS,
920
+ y2 as isMatlabFile,
921
+ ay2 as isNeedsAuthChallengeError,
922
+ az2 as isNetworkError,
923
+ aA2 as isNetworkLikeError,
924
+ aE as isNodeResponse,
925
+ aB as isRateLimitError,
926
+ bi as isRuleFilename,
927
+ a8 as isRulesEnabled,
928
+ bd as isS2,
929
+ c7 as isSerializedContextItemMentionNode,
930
+ c8 as isSerializedTemplateInputNode,
931
+ bH as isValidPromptString,
932
+ a4 as isValidVersion,
933
+ isWindows,
934
+ be as isWorkspaceInstance,
935
+ q2 as languageFromFilename,
936
+ u2 as languageFromFilenameAndContent,
937
+ cS as lifecycle,
938
+ a72 as logDebug,
939
+ a82 as logError,
940
+ bx as logResponseHeadersToSpan,
941
+ v2 as markdownCodeBlockLanguageIDForFilename,
942
+ cu as memoizeLastValue,
943
+ aW as mentionProvidersMetadata,
944
+ cs as merge,
945
+ cM as mergeMap,
946
+ dj as mockAuthStatus,
947
+ da as mockClientCapabilities,
948
+ ac as mockModelsService,
949
+ d6 as mockResolvedConfig,
950
+ m as modelTier,
951
+ aa as modelsService,
952
+ H as newPromptMixin,
953
+ aS as nextTick,
954
+ aO as noOpTelemetryRecorder,
955
+ cg as observableOfSequence,
956
+ ch as observableOfTimedSequence,
957
+ u as ollamaChatClient,
958
+ bn as onAbort,
959
+ aX as openCtxProviderMetadata,
960
+ a$ as openctxController,
961
+ at as parseCompletionJSON,
962
+ r as parseEvents,
963
+ aU as parseMentionQuery,
964
+ p as parseModelRef,
965
+ bk as parseRuleFile,
966
+ A2 as pathFunctionsForURI,
967
+ c_ as pendingOperation,
968
+ cB as pick,
969
+ cA as pluck,
970
+ l2 as pluralize,
971
+ ae as populateCodeContextTemplate,
972
+ al as populateCodeGenerationContextTemplate,
973
+ aj as populateContextTemplateFromText,
974
+ af as populateCurrentEditorDiagnosticsTemplate,
975
+ ah as populateCurrentSelectedCodeContextTemplate,
976
+ ak as populateImportListContextTemplate,
977
+ ai as populateListOfFilesContextTemplate,
978
+ ag as populateTerminalOutputContextTemplate,
979
+ z2 as posixFilePaths,
980
+ cI as printDiff,
981
+ aT as promise,
982
+ co as promiseFactoryToObservable,
983
+ cn as promiseToObservable,
984
+ b9 as proxyExtensionAPI,
985
+ bF as ps,
986
+ bG as psDedent,
987
+ cm as readValuesFrom,
988
+ bz as recordErrorToSpan,
989
+ r2 as reformatBotMessageForChat,
990
+ d4 as resolvedConfig,
991
+ cZ as retry,
992
+ bl as ruleSearchPaths,
993
+ bj as ruleTitle,
994
+ aV as scanForMentionTriggerInUserTextInput,
995
+ bg as serialize,
996
+ s as serializeChatMessage,
997
+ c5 as serializeContextItem,
998
+ bY as serializedPromptEditorStateFromChatMessage,
999
+ bX as serializedPromptEditorStateFromText,
1000
+ dd as setAuthStatusObservable,
1001
+ d8 as setClientCapabilities,
1002
+ ad2 as setClientNameVersion,
1003
+ _2 as setDisplayPathEnvInfo,
1004
+ az as setEditorWindowIsFocused,
1005
+ d9 as setExtensionVersion,
1006
+ aI as setJSONAcceptContentTypeHeaders,
1007
+ a92 as setLogger,
1008
+ a_ as setOpenCtxControllerObservable,
1009
+ d2 as setResolvedConfigurationObservable,
1010
+ ay as setSingleton,
1011
+ d3 as setStaticResolvedConfigurationValue,
1012
+ cC as shareReplay,
1013
+ ax as singletonNotYetSet,
1014
+ a2 as siteVersion,
1015
+ cL as skip,
1016
+ d0 as skipPendingOperation,
1017
+ cJ as startWith,
1018
+ cO as storeLastValue,
1019
+ ce as subscriptionDisposable,
1020
+ cN as switchMap,
1021
+ c$ as switchMapReplayOperation,
1022
+ cK as take,
1023
+ cD as takeUntil,
1024
+ cG as tap,
1025
+ cH as tapLog,
1026
+ V as telemetryEvents,
1027
+ bs as telemetryRecorder,
1028
+ br as telemetryRecorderProvider,
1029
+ cc as templateInputNodeDisplayText,
1030
+ testFileUri,
1031
+ cY as testing__firstValueFromWithinTime,
1032
+ c0 as textContentFromSerializedLexicalNode,
1033
+ cj as toFirstValueGetter,
1034
+ t as toLegacyModel,
1035
+ j as toModelRefStr,
1036
+ bK as toPartialUtf8String,
1037
+ t2 as toRangeData,
1038
+ bW as toSerializedPromptEditorValue,
1039
+ Z as tokensToChars,
1040
+ bu as tracer,
1041
+ K as truncatePromptString,
1042
+ J as truncatePromptStringStart,
1043
+ I as truncateTextNearestLine,
1044
+ bt as updateGlobalTelemetryInstances,
1045
+ K2 as uriBasename,
1046
+ O as uriDirname,
1047
+ Q2 as uriExtname,
1048
+ X2 as uriHasPrefix,
1049
+ R2 as uriParseNameAndExtension,
1050
+ cx as vscodeResource,
1051
+ ck as waitUntilComplete,
1052
+ f2 as webviewOpenURIForContextItem,
1053
+ cV as withLatestFrom,
1054
+ w2 as wrapInActiveSpan
1055
+ };