Skip to content

Commit

Permalink
Handle edit result
Browse files Browse the repository at this point in the history
  • Loading branch information
RXminuS committed Aug 8, 2024
1 parent e7519e5 commit 9d79b56
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import com.sourcegraph.cody.agent.CodyAgentService
import com.sourcegraph.cody.agent.protocol_generated.CodeActions_ProvideParams
import com.sourcegraph.cody.agent.protocol_generated.CodeActions_TriggerParams
import com.sourcegraph.cody.agent.protocol_generated.ProtocolLocation
import com.sourcegraph.cody.edit.actions.EditCodeAction

data class CodeActionQuickFixParams(
val title: String,
Expand Down Expand Up @@ -102,7 +103,8 @@ class CodeActionQuickFix(private val params: CodeActionQuickFixParams) :
throw Exception("Could not find action")
}
// TODO: Need to refactor agent to not return edit session for every action CODY-3125
agent.server.codeActions_trigger(CodeActions_TriggerParams(id = action.id))
val result = agent.server.codeActions_trigger(CodeActions_TriggerParams(id = action.id)).get()
EditCodeAction.completedEditTasks[result.id] = result
}
}
}

0 comments on commit 9d79b56

Please sign in to comment.