Add ability to create named constant without code (#5840)
* Add support for forcing kcl input create variable * Command palette padding tweak * Make traverse function work for ExpressionStatements * Add utilities for getting earliest safe index in AST * Fix the insertIndex logic to not be based on the selection anymore * Add workflow to create a named constant * Fix bug with nameEndInDigits matcher * Tweak command config * Add a three-dot menu to feature tree pane to create parameters * Add E2E test for create parameter flow * Remove edit flow oops * Fix tsc error * Fix E2E test * Update named constant position in edit flow test * Add tags into consideration for safe insert index Per @Irev-dev's helpful feedback, with unit tests!
This commit is contained in:
@ -186,7 +186,7 @@ export type CommandArgumentConfig<
|
||||
}
|
||||
| {
|
||||
inputType: 'kcl'
|
||||
createVariableByDefault?: boolean
|
||||
createVariable?: 'byDefault' | 'force' | 'disallow'
|
||||
variableName?:
|
||||
| string
|
||||
| ((
|
||||
@ -306,7 +306,7 @@ export type CommandArgument<
|
||||
}
|
||||
| {
|
||||
inputType: 'kcl'
|
||||
createVariableByDefault?: boolean
|
||||
createVariable?: 'byDefault' | 'force' | 'disallow'
|
||||
variableName?:
|
||||
| string
|
||||
| ((
|
||||
|
Reference in New Issue
Block a user