Skip to content

Commit

Permalink
feat(InteractionType): add new interaction type and change defaults
Browse files Browse the repository at this point in the history
Added a new interaction type, 'InsertBeforeSelection', to the InteractionType enum. Also, commented out 'ChatPanel' interaction type and changed the default interaction type from 'ChatPanel' to 'AppendCursor'.
  • Loading branch information
phodal committed Jun 29, 2024
1 parent 6905f4f commit b944f93
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ data class CustomAgent(
val connector: ConnectorConfig? = null,
val responseAction: CustomAgentResponseAction = CustomAgentResponseAction.Direct,
val transition: List<CustomFlowTransition> = emptyList(),
val interactive: InteractionType = InteractionType.ChatPanel,
val interactive: InteractionType = InteractionType.AppendCursor,
val auth: CustomAgentAuth? = null,
/**
* Default to 10 minutes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
package com.phodal.shirecore.agent

enum class InteractionType(val description: String) {
ChatPanel("Output results to the chat panel"),
// ChatPanel("Output results to the chat panel"),
AppendCursor("Append content at the current cursor position"),
AppendCursorStream("Append content at the current cursor position, stream output"),
OutputFile("Output to a file"),
ReplaceSelection("Replace the currently selected content"),
ReplaceCurrentFile("Replace the content of the current file")
ReplaceCurrentFile("Replace the content of the current file"),
InsertBeforeSelection("Insert content before the currently selected content"),
;

companion object {
fun from(interaction: String): InteractionType {
return when (interaction) {
"ChatPanel" -> ChatPanel
// "ChatPanel" -> ChatPanel
"AppendCursor" -> AppendCursor
"AppendCursorStream" -> AppendCursorStream
"OutputFile" -> OutputFile
"ReplaceSelection" -> ReplaceSelection
"ReplaceCurrentFile" -> ReplaceCurrentFile
else -> ChatPanel
"InsertBeforeSelection" -> InsertBeforeSelection
else -> AppendCursor
}
}
}
Expand Down

0 comments on commit b944f93

Please sign in to comment.