You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/core/webview/ClineProvider.ts
+13-6Lines changed: 13 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,7 @@ type SecretKey =
49
49
|"togetherApiKey"
50
50
|"qwenApiKey"
51
51
|"mistralApiKey"
52
+
|"liteLlmApiKey"
52
53
|"authToken"
53
54
|"authNonce"
54
55
typeGlobalStateKey=
@@ -334,15 +335,15 @@ export class ClineProvider implements vscode.WebviewViewProvider {
334
335
335
336
// Use a nonce to only allow a specific script to be run.
336
337
/*
337
-
content security policy of your webview to only allow scripts that have a specific nonce
338
-
create a content security policy meta tag so that only loading scripts with a nonce is allowed
339
-
As your extension grows you will likely want to add custom styles, fonts, and/or images to your webview. If you do, you will need to update the content security policy meta tag to explicity allow for these resources. E.g.
content security policy of your webview to only allow scripts that have a specific nonce
339
+
create a content security policy meta tag so that only loading scripts with a nonce is allowed
340
+
As your extension grows you will likely want to add custom styles, fonts, and/or images to your webview. If you do, you will need to update the content security policy meta tag to explicity allow for these resources. E.g.
- 'unsafe-inline' is required for styles due to vscode-webview-toolkit's dynamic style injection
342
343
- since we pass base64 images to the webview, we need to specify img-src ${webview.cspSource} data:;
343
344
344
-
in meta tag we add nonce attribute: A cryptographic nonce (only used once) to allow scripts. The server must generate a unique nonce value each time it transmits a policy. It is critical to provide a nonce that cannot be guessed as bypassing a resource's policy is otherwise trivial.
345
-
*/
345
+
in meta tag we add nonce attribute: A cryptographic nonce (only used once) to allow scripts. The server must generate a unique nonce value each time it transmits a policy. It is critical to provide a nonce that cannot be guessed as bypassing a resource's policy is otherwise trivial.
346
+
*/
346
347
constnonce=getNonce()
347
348
348
349
// Tip: Install the es6-string-html VS Code extension to enable code highlighting below
@@ -462,6 +463,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
0 commit comments