-
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.
"Prompt" chat toolbar item to add a prompt from Prompt Library (#4903)
> NOTE: Only review the last commit (`Prompt selector in chat to select a prompt from the Prompt Library`). The other commits all have their own separate PRs opened. The [Prompt Library](https://sourcegraph.com/prompts) lets you save and share useful prompts for Cody. Now, you can insert a prompt from your Prompt Library into your Cody chat message with this new **Prompts** selector in the message editor toolbar. Feature-flagged off by default (`chat-prompt-selector`). ![image](https://github.com/user-attachments/assets/39d88e1a-8f77-4adc-a30d-6871c0b8146f) ## Test plan Enable the `chat-prompt-selector` feature flag for your user on dotcom. Try adding the `sqs/gen-test-react-vitest` prompt. It should append the prompt's text in your chat message editor.
- Loading branch information
Showing
25 changed files
with
805 additions
and
34 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
7 changes: 7 additions & 0 deletions
7
...lin/lib/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/DefinitionParams.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 DefinitionParams( | ||
val text: 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
7 changes: 7 additions & 0 deletions
7
...s/kotlin/lib/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/OwnerParams.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 OwnerParams( | ||
val namespaceName: String, | ||
) | ||
|
14 changes: 14 additions & 0 deletions
14
...ndings/kotlin/lib/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/Prompt.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,14 @@ | ||
@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") | ||
package com.sourcegraph.cody.agent.protocol_generated; | ||
|
||
data class Prompt( | ||
val id: String, | ||
val name: String, | ||
val nameWithOwner: String, | ||
val owner: OwnerParams, | ||
val description: String? = null, | ||
val draft: Boolean, | ||
val definition: DefinitionParams, | ||
val url: 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
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
Oops, something went wrong.