Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type" : "bugfix",
"description" : "Corrects an issue where documentation updating progress text was erroneously replaced with generation flow text."
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ fun getIconForStep(targetStep: DocGenerationStep, currentStep: DocGenerationStep
else -> checkIcons["wait"]
}

fun docGenerationProgressMessage(currentStep: DocGenerationStep, mode: Mode): String {
fun docGenerationProgressMessage(currentStep: DocGenerationStep, mode: Mode?): String {
val isCreationMode = mode == Mode.CREATE
val baseLine = if (isCreationMode) message("amazonqDoc.progress_message.creating") else message("amazonqDoc.progress_message.updating")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
message = action.msg,
intent = Intent.DOC
)

val codeGenerationResult = generateCode(codeGenerationId = response.codeGenerationId(), token)
val mode = if (action.msg == message("amazonqDoc.session.create")) Mode.CREATE else null
val codeGenerationResult = generateCode(codeGenerationId = response.codeGenerationId(), mode, token)
numberOfReferencesGenerated = codeGenerationResult.references.size
numberOfFilesGenerated = codeGenerationResult.newFiles.size
codeGenerationRemainingIterationCount = codeGenerationResult.codeGenerationRemainingIterationCount
Expand Down Expand Up @@ -138,7 +138,7 @@
return percentage
}

private suspend fun DocGenerationState.generateCode(codeGenerationId: String, token: CancellationTokenSource?): CodeGenerationResult {
private suspend fun DocGenerationState.generateCode(codeGenerationId: String, mode: Mode?, token: CancellationTokenSource?): CodeGenerationResult {
val pollCount = 180
val requestDelay = 10000L

Expand All @@ -152,7 +152,7 @@
followUp = listOf(
FollowUp(
pillText = message("amazonqDoc.prompt.create"),
prompt = message("amazonqDoc.prompt.create"),

Check warning on line 155 in plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqDoc/session/DocGenerationState.kt

View workflow job for this annotation

GitHub Actions / qodana

Usage of redundant or deprecated syntax or deprecated symbols

'message(String, vararg Any): String' is deprecated. Use extension-specific localization bundle instead
type = FollowUpTypes.CREATE_DOCUMENTATION,
),
FollowUp(
Expand Down Expand Up @@ -214,7 +214,7 @@
} else {
DocGenerationStep.GENERATING_ARTIFACTS
},
mode = Mode.CREATE
mode
)
)
}
Expand Down
Loading