@vscode/chat-lib 0.3.1-21 → 0.3.1-22
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/src/_internal/extension/xtab/common/promptCrafting.d.ts +13020 -345
- package/dist/src/_internal/extension/xtab/common/promptCrafting.d.ts.map +1 -1
- package/dist/src/_internal/platform/inlineEdits/common/inlineEditsModelService.d.ts +2 -0
- package/dist/src/_internal/platform/inlineEdits/common/inlineEditsModelService.d.ts.map +1 -1
- package/dist/src/_internal/platform/inlineEdits/common/inlineEditsModelService.js +4 -0
- package/dist/src/_internal/platform/inlineEdits/common/inlineEditsModelService.js.map +1 -1
- package/dist/src/_internal/platform/inlineEdits/node/inlineEditsModelService.d.ts +9 -2
- package/dist/src/_internal/platform/inlineEdits/node/inlineEditsModelService.d.ts.map +1 -1
- package/dist/src/_internal/platform/inlineEdits/node/inlineEditsModelService.js +65 -54
- package/dist/src/_internal/platform/inlineEdits/node/inlineEditsModelService.js.map +1 -1
- package/dist/src/_internal/util/common/result.d.ts +34 -10
- package/dist/src/_internal/util/common/result.d.ts.map +1 -1
- package/dist/src/_internal/util/common/result.js +91 -2
- package/dist/src/_internal/util/common/result.js.map +1 -1
- package/dist/src/package.json +6 -1
- package/package.json +1 -1
|
@@ -3,8 +3,42 @@
|
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
5
|
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
23
|
+
var ownKeys = function(o) {
|
|
24
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
25
|
+
var ar = [];
|
|
26
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
27
|
+
return ar;
|
|
28
|
+
};
|
|
29
|
+
return ownKeys(o);
|
|
30
|
+
};
|
|
31
|
+
return function (mod) {
|
|
32
|
+
if (mod && mod.__esModule) return mod;
|
|
33
|
+
var result = {};
|
|
34
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
35
|
+
__setModuleDefault(result, mod);
|
|
36
|
+
return result;
|
|
37
|
+
};
|
|
38
|
+
})();
|
|
6
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
40
|
exports.Result = void 0;
|
|
41
|
+
const errors = __importStar(require("./errors"));
|
|
8
42
|
var Result;
|
|
9
43
|
(function (Result) {
|
|
10
44
|
function ok(value) {
|
|
@@ -19,6 +53,24 @@ var Result;
|
|
|
19
53
|
return Result.error(new Error(errorMessage));
|
|
20
54
|
}
|
|
21
55
|
Result.fromString = fromString;
|
|
56
|
+
function tryWith(f) {
|
|
57
|
+
try {
|
|
58
|
+
return Result.ok(f());
|
|
59
|
+
}
|
|
60
|
+
catch (err) {
|
|
61
|
+
return Result.error(errors.fromUnknown(err));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
Result.tryWith = tryWith;
|
|
65
|
+
async function tryWithAsync(f) {
|
|
66
|
+
try {
|
|
67
|
+
return Result.ok(await f());
|
|
68
|
+
}
|
|
69
|
+
catch (err) {
|
|
70
|
+
return Result.error(errors.fromUnknown(err));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
Result.tryWithAsync = tryWithAsync;
|
|
22
74
|
})(Result || (exports.Result = Result = {}));
|
|
23
75
|
/**
|
|
24
76
|
* To instantiate a ResultOk, use `Result.ok(value)`.
|
|
@@ -31,9 +83,27 @@ class ResultOk {
|
|
|
31
83
|
map(f) {
|
|
32
84
|
return new ResultOk(f(this.val));
|
|
33
85
|
}
|
|
86
|
+
mapError(_f) {
|
|
87
|
+
return this;
|
|
88
|
+
}
|
|
34
89
|
flatMap(f) {
|
|
35
90
|
return f(this.val);
|
|
36
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
* Returns the contained ok value.
|
|
94
|
+
* @throws if this is an error (which is impossible for `ResultOk`,
|
|
95
|
+
* but provided for use on the `Result<T, E>` union type).
|
|
96
|
+
*/
|
|
97
|
+
unwrap() {
|
|
98
|
+
return this.val;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Returns the contained ok value, or the provided default if this
|
|
102
|
+
* is an error.
|
|
103
|
+
*/
|
|
104
|
+
unwrapOr(_defaultValue) {
|
|
105
|
+
return this.val;
|
|
106
|
+
}
|
|
37
107
|
isOk() {
|
|
38
108
|
return true;
|
|
39
109
|
}
|
|
@@ -49,12 +119,31 @@ class ResultError {
|
|
|
49
119
|
constructor(err) {
|
|
50
120
|
this.err = err;
|
|
51
121
|
}
|
|
52
|
-
map(
|
|
122
|
+
map(_f) {
|
|
53
123
|
return this;
|
|
54
124
|
}
|
|
55
|
-
|
|
125
|
+
mapError(f) {
|
|
126
|
+
return new ResultError(f(this.err));
|
|
127
|
+
}
|
|
128
|
+
flatMap(_f) {
|
|
56
129
|
return this;
|
|
57
130
|
}
|
|
131
|
+
/**
|
|
132
|
+
* Always throws since this is an error result.
|
|
133
|
+
* @throws The contained error value (wrapped in Error if not already one).
|
|
134
|
+
*/
|
|
135
|
+
unwrap() {
|
|
136
|
+
if (this.err instanceof Error) {
|
|
137
|
+
throw this.err;
|
|
138
|
+
}
|
|
139
|
+
throw errors.fromUnknown(this.err);
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Returns the provided default value since this is an error.
|
|
143
|
+
*/
|
|
144
|
+
unwrapOr(defaultValue) {
|
|
145
|
+
return defaultValue;
|
|
146
|
+
}
|
|
58
147
|
isOk() {
|
|
59
148
|
return false;
|
|
60
149
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result.js","sourceRoot":"","sources":["../../../../../src/_internal/util/common/result.ts"],"names":[],"mappings":";AAAA;;;gGAGgG
|
|
1
|
+
{"version":3,"file":"result.js","sourceRoot":"","sources":["../../../../../src/_internal/util/common/result.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEhG,iDAAmC;AAInC,IAAiB,MAAM,CA6BtB;AA7BD,WAAiB,MAAM;IAEtB,SAAgB,EAAE,CAAI,KAAQ;QAC7B,OAAO,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;IAFe,SAAE,KAEjB,CAAA;IAED,SAAgB,KAAK,CAAI,KAAQ;QAChC,OAAO,IAAI,WAAW,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IAFe,YAAK,QAEpB,CAAA;IAED,SAAgB,UAAU,CAAC,YAAoB;QAC9C,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;IAC9C,CAAC;IAFe,iBAAU,aAEzB,CAAA;IAED,SAAgB,OAAO,CAAI,CAAU;QACpC,IAAI,CAAC;YACJ,OAAO,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QACvB,CAAC;QAAC,OAAO,GAAG,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IAAI,CAAC;IACb,CAAC;IAED,QAAQ,CAAK,CAAmB;QAC/B,OAAO,IAAI,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACrC,CAAC;IAED,OAAO,CAAQ,EAAmC;QACjD,OAAO,IAAI,CAAC;IACb,CAAC;IAED;;;OAGG;IACH,MAAM;QACL,IAAI,IAAI,CAAC,GAAG,YAAY,KAAK,EAAE,CAAC;YAC/B,MAAM,IAAI,CAAC,GAAG,CAAC;QAChB,CAAC;QACD,MAAM,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACpC,CAAC;IAED;;OAEG;IACH,QAAQ,CAAI,YAAe;QAC1B,OAAO,YAAY,CAAC;IACrB,CAAC;IAED,IAAI;QACH,OAAO,KAAK,CAAC;IACd,CAAC;IAED,OAAO;QACN,OAAO,IAAI,CAAC;IACb,CAAC;CACD"}
|
package/dist/src/package.json
CHANGED
|
@@ -1815,6 +1815,10 @@
|
|
|
1815
1815
|
"vendor": "copilot",
|
|
1816
1816
|
"displayName": "Copilot"
|
|
1817
1817
|
},
|
|
1818
|
+
{
|
|
1819
|
+
"vendor": "copilotcli",
|
|
1820
|
+
"displayName": "Copilot CLI"
|
|
1821
|
+
},
|
|
1818
1822
|
{
|
|
1819
1823
|
"vendor": "anthropic",
|
|
1820
1824
|
"displayName": "Anthropic",
|
|
@@ -5719,7 +5723,8 @@
|
|
|
5719
5723
|
"supportsImageAttachments": true,
|
|
5720
5724
|
"supportsSymbolAttachments": true,
|
|
5721
5725
|
"supportsSearchResultAttachments": true,
|
|
5722
|
-
"supportsSourceControlAttachments": true
|
|
5726
|
+
"supportsSourceControlAttachments": true,
|
|
5727
|
+
"supportsPromptAttachments": true
|
|
5723
5728
|
},
|
|
5724
5729
|
"commands": [
|
|
5725
5730
|
{
|