Skip to content

Commit ced76d9

Browse files
committed
refactor(harmonyos): add language parameter to AutoArkUiContext constructor
Add a new language parameter to the constructor of AutoArkUiContext class in AutoArkUiAction.kt. This allows for providing the language of the selected file which is displayed in the UI.
1 parent 15f68cd commit ced76d9

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

exts/ext-harmonyos/src/main/kotlin/cc/unitmesh/harmonyos/actions/AutoArkUiAction.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class AutoArkUiAction : ChatBaseIntention() {
2929

3030
val context = AutoArkUiContext(
3131
selectedText,
32+
language = file.language.displayName,
3233
layoutOverride = ArkUiLayoutType.overview(),
3334
componentOverride = ArkUiComponentType.overview(),
3435
)

exts/ext-harmonyos/src/main/kotlin/cc/unitmesh/harmonyos/actions/auto/AutoArkUiContext.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ data class AutoArkUiContext(
44
val requirement: String,
55
val layoutOverride: String,
66
val componentOverride: String,
7+
val language: String,
78
var elements: List<String> = emptyList(),
89
)

0 commit comments

Comments
 (0)