Skip to content
This repository was archived by the owner on Mar 5, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/main/kotlin/com/sourcegraph/cody/agent/CodyAgentServer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ interface _SubsetGeneratedCodyAgentServer {
@JsonRequest("editCommands/code")
fun editCommands_code(params: EditCommands_CodeParams): CompletableFuture<EditTask>

@JsonRequest("editCommands/document")
fun editCommands_document(params: Null?): CompletableFuture<EditTask>

@JsonRequest("webview/resolveWebviewView")
fun webview_resolveWebviewView(params: Webview_ResolveWebviewViewParams): CompletableFuture<Null?>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
package com.sourcegraph.cody.edit.actions

import com.sourcegraph.cody.agent.CodyAgentService
import com.sourcegraph.cody.agent.protocol_generated.Commands_CustomParams
import com.sourcegraph.cody.agent.protocol_generated.CustomEditCommandResult

class DocumentCodeAction :
BaseEditCodeAction({ editor ->
editor.project?.let { project ->
CodyAgentService.withAgent(project) { agent ->
val customCommandResult = agent.server.commands_custom(Commands_CustomParams("doc")).get()
val result = customCommandResult as? CustomEditCommandResult ?: return@withAgent
EditCodeAction.completedEditTasks[result.editResult.id] = result.editResult
val result = agent.server.editCommands_document(null).get()
EditCodeAction.completedEditTasks[result.id] = result
}
}
}) {
Expand Down