-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Agent: Changes required for running webview in clients (#5157)
Context: https://sourcegraph.slack.com/archives/C06R69BC8UW/p1723199277787079 ## Changes A bunch of changes needed for getting chat webview to work in other clients, e.g JetBrains, Visual Studio and Eclipse. Related PR: sourcegraph/jetbrains#2022 ## Test plan Full QA on jetbrains branch --------- Co-authored-by: Dominic Cooney <[email protected]> Co-authored-by: Beatrix <[email protected]> Co-authored-by: Beatrix <[email protected]> Co-authored-by: Daniel Marques <[email protected]>
- Loading branch information
1 parent
869de99
commit 9ded843
Showing
44 changed files
with
1,187 additions
and
299 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,11 @@ | ||
hoist=false | ||
1 | ||
2 | ||
3 | ||
4 | ||
5 | ||
6 | ||
7 | ||
8 | ||
9 | ||
10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
nodejs 20.4.0 | ||
pnpm 8.6.7 | ||
yarn 1.22.19 # required for agent/scripts/generate-agent-bindings.sh -> scip-typescript-cody-bindings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/DefiniteWebviewOptions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") | ||
package com.sourcegraph.cody.agent.protocol_generated; | ||
|
||
data class DefiniteWebviewOptions( | ||
val enableScripts: Boolean, | ||
val enableForms: Boolean, | ||
val enableOnlyCommandUris: List<String>? = null, | ||
val localResourceRoots: List<String>? = null, | ||
val portMapping: List<PortMappingParams>, | ||
val enableFindWidget: Boolean, | ||
val retainContextWhenHidden: Boolean, | ||
) | ||
|
5 changes: 2 additions & 3 deletions
5
...rotocol_generated/Webview_CreateParams.kt → ...tocol_generated/Env_OpenExternalParams.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") | ||
package com.sourcegraph.cody.agent.protocol_generated; | ||
|
||
data class Webview_CreateParams( | ||
val id: String, | ||
val data: Any, | ||
data class Env_OpenExternalParams( | ||
val uri: String, | ||
) | ||
|
8 changes: 8 additions & 0 deletions
8
...in/lib/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/PortMappingParams.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") | ||
package com.sourcegraph.cody.agent.protocol_generated; | ||
|
||
data class PortMappingParams( | ||
val webviewPort: Long, | ||
val extensionHostPort: Long, | ||
) | ||
|
8 changes: 8 additions & 0 deletions
8
...in/lib/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ShowOptionsParams.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") | ||
package com.sourcegraph.cody.agent.protocol_generated; | ||
|
||
data class ShowOptionsParams( | ||
val preserveFocus: Boolean, | ||
val viewColumn: Long, | ||
) | ||
|
13 changes: 13 additions & 0 deletions
13
.../kotlin/com/sourcegraph/cody/agent/protocol_generated/WebviewCreateWebviewPanelOptions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") | ||
package com.sourcegraph.cody.agent.protocol_generated; | ||
|
||
data class WebviewCreateWebviewPanelOptions( | ||
val enableScripts: Boolean, | ||
val enableForms: Boolean, | ||
val enableOnlyCommandUris: List<String>? = null, | ||
val localResourceRoots: List<String>? = null, | ||
val portMapping: List<PortMappingParams>, | ||
val enableFindWidget: Boolean, | ||
val retainContextWhenHidden: Boolean, | ||
) | ||
|
8 changes: 8 additions & 0 deletions
8
...rc/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/WebviewNativeConfigParams.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") | ||
package com.sourcegraph.cody.agent.protocol_generated; | ||
|
||
data class WebviewNativeConfigParams( | ||
val cspSource: String, | ||
val webviewBundleServingPrefix: String, | ||
) | ||
|
11 changes: 11 additions & 0 deletions
11
.../kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_CreateWebviewPanelParams.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") | ||
package com.sourcegraph.cody.agent.protocol_generated; | ||
|
||
data class Webview_CreateWebviewPanelParams( | ||
val handle: String, | ||
val viewType: String, | ||
val title: String, | ||
val showOptions: ShowOptionsParams, | ||
val options: WebviewCreateWebviewPanelOptions, | ||
) | ||
|
7 changes: 7 additions & 0 deletions
7
...in/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_DidDisposeNativeParams.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") | ||
package com.sourcegraph.cody.agent.protocol_generated; | ||
|
||
data class Webview_DidDisposeNativeParams( | ||
val handle: String, | ||
) | ||
|
7 changes: 7 additions & 0 deletions
7
...ib/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_DisposeParams.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") | ||
package com.sourcegraph.cody.agent.protocol_generated; | ||
|
||
data class Webview_DisposeParams( | ||
val handle: String, | ||
) | ||
|
8 changes: 8 additions & 0 deletions
8
...om/sourcegraph/cody/agent/protocol_generated/Webview_RegisterWebviewViewProviderParams.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") | ||
package com.sourcegraph.cody.agent.protocol_generated; | ||
|
||
data class Webview_RegisterWebviewViewProviderParams( | ||
val viewId: String, | ||
val retainContextWhenHidden: Boolean, | ||
) | ||
|
8 changes: 8 additions & 0 deletions
8
.../kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_ResolveWebviewViewParams.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") | ||
package com.sourcegraph.cody.agent.protocol_generated; | ||
|
||
data class Webview_ResolveWebviewViewParams( | ||
val viewId: String, | ||
val webviewHandle: String, | ||
) | ||
|
9 changes: 9 additions & 0 deletions
9
...lib/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_RevealParams.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") | ||
package com.sourcegraph.cody.agent.protocol_generated; | ||
|
||
data class Webview_RevealParams( | ||
val handle: String, | ||
val viewColumn: Long, | ||
val preserveFocus: Boolean, | ||
) | ||
|
8 changes: 8 additions & 0 deletions
8
...ib/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_SetHtmlParams.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") | ||
package com.sourcegraph.cody.agent.protocol_generated; | ||
|
||
data class Webview_SetHtmlParams( | ||
val handle: String, | ||
val html: String, | ||
) | ||
|
8 changes: 8 additions & 0 deletions
8
...rc/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_SetIconPathParams.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") | ||
package com.sourcegraph.cody.agent.protocol_generated; | ||
|
||
data class Webview_SetIconPathParams( | ||
val handle: String, | ||
val iconPathUri: String? = null, | ||
) | ||
|
8 changes: 8 additions & 0 deletions
8
...src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_SetOptionsParams.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") | ||
package com.sourcegraph.cody.agent.protocol_generated; | ||
|
||
data class Webview_SetOptionsParams( | ||
val handle: String, | ||
val options: DefiniteWebviewOptions, | ||
) | ||
|
8 changes: 8 additions & 0 deletions
8
...b/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Webview_SetTitleParams.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") | ||
package com.sourcegraph.cody.agent.protocol_generated; | ||
|
||
data class Webview_SetTitleParams( | ||
val handle: String, | ||
val title: String, | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.