@sourcegraph/cody-web 0.38.0 → 0.40.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.
- package/dist/{agent.worker-Bm74MuX8.mjs → agent.worker-Di-hO351.mjs} +85 -9
- package/dist/agent.worker.js +2 -2
- package/dist/{git-log-DjCz8t7A.mjs → git-log-BOf0Q_uO.mjs} +1 -1
- package/dist/{index-CQZWUrDD.mjs → index-CDrWlDvL.mjs} +4 -4
- package/dist/index.js +347 -252
- package/dist/lib/components/CodyPromptTemplate.d.ts +8 -0
- package/dist/lib/components/CodyPromptTemplate.d.ts.map +1 -1
- package/dist/lib/components/CodyWebChat.d.ts +8 -0
- package/dist/lib/components/CodyWebChat.d.ts.map +1 -1
- package/dist/{lite-BPYOwOSx.mjs → lite-DCeO0vlV.mjs} +1 -1
- package/dist/style.css +34 -50
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{util-Ci-ROool.mjs → util-DSBgjmTR.mjs} +1 -1
- package/dist/{vscode-shim-CdmSM8Q0.mjs → vscode-shim-BM22pmQn.mjs} +90 -41
- package/package.json +15 -17
- package/LICENSE +0 -201
|
@@ -5980,14 +5980,32 @@ class OAuthCredential {
|
|
|
5980
5980
|
const result = await refreshOAuthToken(endpoint, refreshToken);
|
|
5981
5981
|
if (!(result == null ? void 0 : result.accessToken)) return void 0;
|
|
5982
5982
|
if (result.refreshToken) {
|
|
5983
|
-
|
|
5983
|
+
try {
|
|
5984
|
+
await ((_a3 = clientSecrets.storeRefreshToken) == null ? void 0 : _a3.call(clientSecrets, endpoint, result.refreshToken));
|
|
5985
|
+
} catch (error2) {
|
|
5986
|
+
logError(
|
|
5987
|
+
"OAuthCredential",
|
|
5988
|
+
"Failed to store new refresh token - user must re-authenticate",
|
|
5989
|
+
{ error: error2 }
|
|
5990
|
+
);
|
|
5991
|
+
throw error2;
|
|
5992
|
+
}
|
|
5984
5993
|
}
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5994
|
+
try {
|
|
5995
|
+
if (result.expiresIn) {
|
|
5996
|
+
const expiresAt = Date.now() + result.expiresIn * 1e3;
|
|
5997
|
+
await ((_b2 = clientSecrets.storeTokenExpiresAt) == null ? void 0 : _b2.call(clientSecrets, endpoint, expiresAt));
|
|
5998
|
+
}
|
|
5999
|
+
} catch (error2) {
|
|
6000
|
+
logError("OAuthCredential", "Failed to store token expiry", { error: error2 });
|
|
5988
6001
|
}
|
|
5989
|
-
|
|
5990
|
-
|
|
6002
|
+
try {
|
|
6003
|
+
if (result.accessToken) {
|
|
6004
|
+
await ((_c2 = clientSecrets.storeToken) == null ? void 0 : _c2.call(clientSecrets, endpoint, result.accessToken, "oauth"));
|
|
6005
|
+
}
|
|
6006
|
+
} catch (error2) {
|
|
6007
|
+
logError("OAuthCredential", "Failed to store access token", { error: error2 });
|
|
6008
|
+
throw error2;
|
|
5991
6009
|
}
|
|
5992
6010
|
return result.accessToken;
|
|
5993
6011
|
}
|
|
@@ -5996,7 +6014,7 @@ class OAuthCredential {
|
|
|
5996
6014
|
const refreshToken = await ((_b2 = (_a3 = this.clientSecrets).getRefreshToken) == null ? void 0 : _b2.call(_a3, this.endpoint));
|
|
5997
6015
|
const expiresAt = await ((_d2 = (_c2 = this.clientSecrets).getTokenExpiresAt) == null ? void 0 : _d2.call(_c2, this.endpoint));
|
|
5998
6016
|
let token = await ((_f2 = (_e2 = this.clientSecrets).getToken) == null ? void 0 : _f2.call(_e2, this.endpoint));
|
|
5999
|
-
if (!token || this.needsRefresh(expiresAt
|
|
6017
|
+
if (!token || refreshToken && this.needsRefresh(expiresAt)) {
|
|
6000
6018
|
if (!this.refreshInFlight && refreshToken) {
|
|
6001
6019
|
this.refreshInFlight = OAuthCredential.refreshAndStore(
|
|
6002
6020
|
this.endpoint,
|
|
@@ -6008,16 +6026,20 @@ class OAuthCredential {
|
|
|
6008
6026
|
}
|
|
6009
6027
|
const refreshPromise = this.refreshInFlight;
|
|
6010
6028
|
if (refreshPromise) {
|
|
6011
|
-
|
|
6012
|
-
if (
|
|
6029
|
+
const refreshedToken = await refreshPromise;
|
|
6030
|
+
if (refreshedToken) {
|
|
6031
|
+
token = refreshedToken;
|
|
6032
|
+
this.error = null;
|
|
6033
|
+
} else if (!token) {
|
|
6013
6034
|
if (!this.error) {
|
|
6014
6035
|
externalAuthRefresh.next();
|
|
6015
6036
|
}
|
|
6016
6037
|
this.error = new OAuthProviderError("An error occurred while refreshing the token");
|
|
6017
6038
|
throw this.error;
|
|
6039
|
+
} else {
|
|
6040
|
+
this.error = null;
|
|
6018
6041
|
}
|
|
6019
|
-
|
|
6020
|
-
} else {
|
|
6042
|
+
} else if (!token) {
|
|
6021
6043
|
if (!this.error) {
|
|
6022
6044
|
externalAuthRefresh.next();
|
|
6023
6045
|
}
|
|
@@ -6030,8 +6052,8 @@ class OAuthCredential {
|
|
|
6030
6052
|
};
|
|
6031
6053
|
return headers;
|
|
6032
6054
|
}
|
|
6033
|
-
needsRefresh(expiresAt
|
|
6034
|
-
if (!expiresAt
|
|
6055
|
+
needsRefresh(expiresAt) {
|
|
6056
|
+
if (!expiresAt) {
|
|
6035
6057
|
return true;
|
|
6036
6058
|
}
|
|
6037
6059
|
const now2 = Date.now();
|
|
@@ -6049,7 +6071,7 @@ async function executeCommand(cmd) {
|
|
|
6049
6071
|
throw new Error("Command execution is only supported in Node.js environments");
|
|
6050
6072
|
}
|
|
6051
6073
|
const { exec: exec2 } = await Promise.resolve().then(() => child_process);
|
|
6052
|
-
const { promisify: promisify2 } = await import("./util-
|
|
6074
|
+
const { promisify: promisify2 } = await import("./util-DSBgjmTR.mjs").then((n) => n.u);
|
|
6053
6075
|
const execAsync = promisify2(exec2);
|
|
6054
6076
|
const command = cmd.commandLine.join(" ");
|
|
6055
6077
|
const { stdout } = await execAsync(command, {
|
|
@@ -27703,15 +27725,27 @@ function toLightweightChatTranscript(transcript) {
|
|
|
27703
27725
|
return !!((_a4 = i2.assistantMessage) == null ? void 0 : _a4.model);
|
|
27704
27726
|
}
|
|
27705
27727
|
)) == null ? void 0 : _b2.assistantMessage;
|
|
27728
|
+
const MAX_SEARCHABLE_LENGTH = 2e3;
|
|
27729
|
+
const title = transcript.chatTitle ?? "";
|
|
27730
|
+
const message = (firstHumanMessage == null ? void 0 : firstHumanMessage.text) ?? "";
|
|
27731
|
+
const fullSearchableText = title && message && !message.startsWith(title) ? `${title} ${message}` : title || message;
|
|
27732
|
+
const searchableText = fullSearchableText.slice(0, MAX_SEARCHABLE_LENGTH).toLowerCase();
|
|
27706
27733
|
return {
|
|
27707
27734
|
id: transcript.id,
|
|
27708
|
-
chatTitle: transcript.chatTitle
|
|
27735
|
+
chatTitle: transcript.chatTitle ?? truncateText(firstHumanMessage == null ? void 0 : firstHumanMessage.text),
|
|
27709
27736
|
lastInteractionTimestamp: transcript.lastInteractionTimestamp,
|
|
27710
27737
|
firstHumanMessageText: firstHumanMessage == null ? void 0 : firstHumanMessage.text,
|
|
27711
27738
|
model: lastAssistantMessage == null ? void 0 : lastAssistantMessage.model,
|
|
27712
|
-
mode: (lastAssistantMessage == null ? void 0 : lastAssistantMessage.intent) ?? "chat"
|
|
27739
|
+
mode: (lastAssistantMessage == null ? void 0 : lastAssistantMessage.intent) ?? "chat",
|
|
27740
|
+
searchableText
|
|
27713
27741
|
};
|
|
27714
27742
|
}
|
|
27743
|
+
function truncateText(text, maxLength = 25) {
|
|
27744
|
+
var _a3;
|
|
27745
|
+
const line = ((_a3 = text == null ? void 0 : text.trim()) == null ? void 0 : _a3.split("\n")[0]) ?? "";
|
|
27746
|
+
if (!line) return "";
|
|
27747
|
+
return line.length > maxLength ? `${line.slice(0, maxLength).trim()}...` : line;
|
|
27748
|
+
}
|
|
27715
27749
|
const CODY_PASSTHROUGH_VSCODE_OPEN_COMMAND_ID = "_cody.vscode.open";
|
|
27716
27750
|
function commandURIForVSCodeOpen(resource, range2) {
|
|
27717
27751
|
return `command:${CODY_PASSTHROUGH_VSCODE_OPEN_COMMAND_ID}?${encodeURIComponent(
|
|
@@ -42394,7 +42428,7 @@ const camelCase$1 = /* @__PURE__ */ getDefaultExportFromCjs(camelCase_1);
|
|
|
42394
42428
|
const $schema = "package.schema.json";
|
|
42395
42429
|
const name = "cody-ai";
|
|
42396
42430
|
const displayName = "Cody: AI Code Assistant";
|
|
42397
|
-
const version = "1.
|
|
42431
|
+
const version = "1.138.0";
|
|
42398
42432
|
const publisher = "sourcegraph";
|
|
42399
42433
|
const license = "Apache-2.0";
|
|
42400
42434
|
const icon = "resources/sourcegraph.png";
|
|
@@ -42928,7 +42962,21 @@ const contributes = {
|
|
|
42928
42962
|
},
|
|
42929
42963
|
{
|
|
42930
42964
|
command: "cody.debug.auth.setInvalidRefreshToken",
|
|
42931
|
-
title: "[Dev] Set Invalid
|
|
42965
|
+
title: "[Dev] Set Invalid Refresh Token",
|
|
42966
|
+
category: "Cody Debug",
|
|
42967
|
+
group: "Debug",
|
|
42968
|
+
enablement: "cody.activated && cody.devOrTest"
|
|
42969
|
+
},
|
|
42970
|
+
{
|
|
42971
|
+
command: "cody.debug.auth.clearRefreshToken",
|
|
42972
|
+
title: "[Dev] Clear Refresh Token Only",
|
|
42973
|
+
category: "Cody Debug",
|
|
42974
|
+
group: "Debug",
|
|
42975
|
+
enablement: "cody.activated && cody.devOrTest"
|
|
42976
|
+
},
|
|
42977
|
+
{
|
|
42978
|
+
command: "cody.debug.auth.simulateRefreshStorageFailure",
|
|
42979
|
+
title: "[Dev] Simulate Refresh Storage Failure",
|
|
42932
42980
|
category: "Cody Debug",
|
|
42933
42981
|
group: "Debug",
|
|
42934
42982
|
enablement: "cody.activated && cody.devOrTest"
|
|
@@ -47219,32 +47267,33 @@ export {
|
|
|
47219
47267
|
onDidChangeTextEditorSelection as g7,
|
|
47220
47268
|
statSync as g8,
|
|
47221
47269
|
copySync as g9,
|
|
47270
|
+
child_process as gA,
|
|
47222
47271
|
getOIDCConfiguration as ga,
|
|
47223
47272
|
getOAuthClientId as gb,
|
|
47224
47273
|
OAuthCredential as gc,
|
|
47225
|
-
|
|
47226
|
-
|
|
47227
|
-
|
|
47228
|
-
|
|
47229
|
-
|
|
47230
|
-
|
|
47231
|
-
|
|
47232
|
-
|
|
47233
|
-
|
|
47234
|
-
|
|
47235
|
-
|
|
47236
|
-
|
|
47237
|
-
|
|
47238
|
-
|
|
47239
|
-
|
|
47240
|
-
|
|
47241
|
-
|
|
47242
|
-
|
|
47243
|
-
|
|
47244
|
-
|
|
47245
|
-
|
|
47246
|
-
|
|
47247
|
-
|
|
47274
|
+
refreshOAuthToken as gd,
|
|
47275
|
+
structuredPatch as ge,
|
|
47276
|
+
capitalize$2 as gf,
|
|
47277
|
+
InlineCompletionItem as gg,
|
|
47278
|
+
createTwoFilesPatch as gh,
|
|
47279
|
+
vsCodeMocks as gi,
|
|
47280
|
+
metrics as gj,
|
|
47281
|
+
_ as gk,
|
|
47282
|
+
_baseGetTag as gl,
|
|
47283
|
+
exec as gm,
|
|
47284
|
+
getPlatform as gn,
|
|
47285
|
+
CodeActionKind as go,
|
|
47286
|
+
createCodeSearchProvider as gp,
|
|
47287
|
+
formatRuleForPrompt as gq,
|
|
47288
|
+
DecorationRangeBehavior as gr,
|
|
47289
|
+
diffLines as gs,
|
|
47290
|
+
CODY_SUPPORT_URL as gt,
|
|
47291
|
+
CODY_DOC_URL as gu,
|
|
47292
|
+
DISCORD_URL as gv,
|
|
47293
|
+
VSCODE_CHANGELOG_URL as gw,
|
|
47294
|
+
SG_CHANGELOG_URL as gx,
|
|
47295
|
+
ACCOUNT_LIMITS_INFO_URL as gy,
|
|
47296
|
+
ExtensionMode as gz,
|
|
47248
47297
|
DefaultEditCommands as h,
|
|
47249
47298
|
isAbortError as i,
|
|
47250
47299
|
dedupeWith as j,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sourcegraph/cody-web",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.40.0",
|
|
4
4
|
"description": "Cody standalone web app",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -11,20 +11,29 @@
|
|
|
11
11
|
"main": "dist/index.js",
|
|
12
12
|
"types": "dist/lib/index.d.ts",
|
|
13
13
|
"sideEffects": true,
|
|
14
|
-
"files": [
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
"files": ["dist/*"],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"dev": "vite --mode development",
|
|
17
|
+
"dev:standalone": "CODY_WEB_DEMO_STANDALONE_MODE=true vite --mode development",
|
|
18
|
+
"build": "vite build --mode production && tsc --build",
|
|
19
|
+
"test": "vitest",
|
|
20
|
+
"build-ts": "tsc --build"
|
|
21
|
+
},
|
|
17
22
|
"dependencies": {
|
|
18
23
|
"@emotion/is-prop-valid": "^1.3.1"
|
|
19
24
|
},
|
|
20
25
|
"devDependencies": {
|
|
21
26
|
"@openctx/vscode-lib": "^0.0.26",
|
|
27
|
+
"@sourcegraph/cody": "workspace:*",
|
|
28
|
+
"@sourcegraph/cody-shared": "workspace:*",
|
|
29
|
+
"@sourcegraph/prompt-editor": "workspace:*",
|
|
22
30
|
"@types/lodash": "4.14.195",
|
|
23
31
|
"@types/vscode": "^1.92.0",
|
|
24
32
|
"@vitejs/plugin-react-swc": "^3.6.0",
|
|
25
33
|
"@vscode/codicons": "^0.0.35",
|
|
26
34
|
"buffer": "^6.0.3",
|
|
27
35
|
"classnames": "^2.5.1",
|
|
36
|
+
"cody-ai": "workspace:*",
|
|
28
37
|
"events": "^3.3.0",
|
|
29
38
|
"idb": "^8.0.0",
|
|
30
39
|
"lodash": "4.17.21",
|
|
@@ -37,17 +46,6 @@
|
|
|
37
46
|
"util": "^0.12.5",
|
|
38
47
|
"vite-bundle-analyzer": "^0.10.5",
|
|
39
48
|
"vite-plugin-svgr": "^4.2.0",
|
|
40
|
-
"vscode-uri": "^3.0.8"
|
|
41
|
-
"@sourcegraph/cody": "5.5.23",
|
|
42
|
-
"@sourcegraph/cody-shared": "0.0.10",
|
|
43
|
-
"@sourcegraph/prompt-editor": "0.0.1",
|
|
44
|
-
"cody-ai": "1.136.0"
|
|
45
|
-
},
|
|
46
|
-
"scripts": {
|
|
47
|
-
"dev": "vite --mode development",
|
|
48
|
-
"dev:standalone": "CODY_WEB_DEMO_STANDALONE_MODE=true vite --mode development",
|
|
49
|
-
"build": "vite build --mode production && tsc --build",
|
|
50
|
-
"test": "vitest",
|
|
51
|
-
"build-ts": "tsc --build"
|
|
49
|
+
"vscode-uri": "^3.0.8"
|
|
52
50
|
}
|
|
53
|
-
}
|
|
51
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
-
|
|
12
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
-
the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
-
other entities that control, are controlled by, or are under common
|
|
17
|
-
control with that entity. For the purposes of this definition,
|
|
18
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
-
direction or management of such entity, whether by contract or
|
|
20
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
-
Object form, made available under the License, as indicated by a
|
|
37
|
-
copyright notice that is included in or attached to the work
|
|
38
|
-
(an example is provided in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
-
of this License, Derivative Works shall not include works that remain
|
|
45
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
-
the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean any work of authorship, including
|
|
49
|
-
the original version of the Work and any modifications or additions
|
|
50
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
-
means any form of electronic, verbal, or written communication sent
|
|
55
|
-
to the Licensor or its representatives, including but not limited to
|
|
56
|
-
communication on electronic mailing lists, source code control systems,
|
|
57
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
-
excluding communication that is conspicuously marked or otherwise
|
|
60
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
-
|
|
62
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
-
subsequently incorporated within the Work.
|
|
65
|
-
|
|
66
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
-
Work and such Derivative Works in Source or Object form.
|
|
72
|
-
|
|
73
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or
|
|
95
|
-
Derivative Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for reasonable and customary use in describing the
|
|
141
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
-
or other liability obligations and/or rights consistent with this
|
|
169
|
-
License. However, in accepting such obligations, You may act only
|
|
170
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
-
defend, and hold each Contributor harmless for any liability
|
|
173
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
-
of your accepting any such warranty or additional liability.
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|
|
177
|
-
|
|
178
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
-
|
|
180
|
-
To apply the Apache License to your work, attach the following
|
|
181
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
-
replaced with your own identifying information. (Don't include
|
|
183
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
-
comment syntax for the file format. We also recommend that a
|
|
185
|
-
file or class name and description of purpose be included on the
|
|
186
|
-
same "printed page" as the copyright notice for easier
|
|
187
|
-
identification within third-party archives.
|
|
188
|
-
|
|
189
|
-
Copyright 2022 Sourcegraph, Inc.
|
|
190
|
-
|
|
191
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
-
you may not use this file except in compliance with the License.
|
|
193
|
-
You may obtain a copy of the License at
|
|
194
|
-
|
|
195
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
-
|
|
197
|
-
Unless required by applicable law or agreed to in writing, software
|
|
198
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
-
See the License for the specific language governing permissions and
|
|
201
|
-
limitations under the License.
|