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