Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
c682a78
[Gradle Release Plugin] - new version commit: 'v1.5.1'.
Jan 19, 2026
0325df5
Escape double quotes in text mode
LakshanWeerasinghe Jan 23, 2026
d3f282e
Handle unescaping in text mode
LakshanWeerasinghe Jan 23, 2026
0fc701b
Update source gen tests
LakshanWeerasinghe Jan 23, 2026
c150e4c
Update model generator tests
LakshanWeerasinghe Jan 23, 2026
417ef3f
Handle unescaping text mode in service designer
LakshanWeerasinghe Jan 23, 2026
5ddd9ea
Update get listener from source test
LakshanWeerasinghe Jan 23, 2026
9b49c91
Update updating listener test
LakshanWeerasinghe Jan 23, 2026
16bd7b2
Handle new line in UX in text mode
LakshanWeerasinghe Jan 23, 2026
578aeee
Update source gen tests
LakshanWeerasinghe Jan 23, 2026
6685a21
Fix issue with handling new lines in service designer
LakshanWeerasinghe Jan 23, 2026
4966983
Update adding service and listener tests
LakshanWeerasinghe Jan 23, 2026
8900af5
Update flow-model-generator/modules/flow-model-generator-core/src/mai…
LakshanWeerasinghe Jan 23, 2026
ff0f5ac
Fix issue with ftp service builder
LakshanWeerasinghe Jan 23, 2026
b424b18
Use only expr mode for arrays and maps
LakshanWeerasinghe Jan 23, 2026
ae260b4
Update node template tests
LakshanWeerasinghe Jan 23, 2026
6d87a22
Update module nodes tests
LakshanWeerasinghe Jan 23, 2026
9605e58
Merge pull request #654 from LakshanWeerasinghe/fix#2324
LakshanWeerasinghe Jan 23, 2026
28f92df
Update model generator tests
LakshanWeerasinghe Jan 23, 2026
c3af33a
Update get listener from source test
LakshanWeerasinghe Jan 23, 2026
52bb627
Flow node gen tests
LakshanWeerasinghe Jan 23, 2026
b4b69f7
Update agents manager template tests
LakshanWeerasinghe Jan 23, 2026
027883a
Update service field node test
LakshanWeerasinghe Jan 23, 2026
316dfe3
Update failing tests
LakshanWeerasinghe Jan 23, 2026
7bfca81
Update failing tests of kafka
LakshanWeerasinghe Jan 23, 2026
28942d8
Update failing get listener model tests
LakshanWeerasinghe Jan 23, 2026
fb677a9
Merge pull request #656 from LakshanWeerasinghe/fix-expr-set
LakshanWeerasinghe Jan 23, 2026
3f77404
[Gradle Release Plugin] - new version commit: 'v1.5.2'.
Jan 23, 2026
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
Expand Up @@ -1386,7 +1386,7 @@ private void buildPropertyType(Property.Builder<?> builder, ParameterData paramD
builder.type(Property.ValueType.RAW_TEMPLATE);
}
} else {
builder.typeWithExpression(paramData.typeSymbol(), moduleInfo, value, semanticModel);
builder.typeWithExpression(paramData.typeSymbol(), moduleInfo, value, semanticModel, builder);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import io.ballerina.compiler.api.symbols.TypeDescKind;
import io.ballerina.compiler.api.symbols.TypeSymbol;
import io.ballerina.compiler.api.symbols.UnionTypeSymbol;
import io.ballerina.compiler.syntax.tree.MappingConstructorExpressionNode;
import io.ballerina.compiler.syntax.tree.Node;
import io.ballerina.flowmodelgenerator.core.DiagnosticHandler;
import io.ballerina.modelgenerator.commons.CommonUtils;
Expand Down Expand Up @@ -548,11 +547,11 @@ public Builder<T> typeWithTemplate(Property.ValueType valueType, Property templa
}

public Builder<T> typeWithExpression(TypeSymbol typeSymbol, ModuleInfo moduleInfo) {
return typeWithExpression(typeSymbol, moduleInfo, null, null);
return typeWithExpression(typeSymbol, moduleInfo, null, null, null);
}

public Builder<T> typeWithExpression(TypeSymbol typeSymbol, ModuleInfo moduleInfo,
Node value, SemanticModel semanticModel) {
Node value, SemanticModel semanticModel, Property.Builder<?> builder) {
if (typeSymbol == null) {
return this;
}
Expand Down Expand Up @@ -633,13 +632,7 @@ public Builder<T> typeWithExpression(TypeSymbol typeSymbol, ModuleInfo moduleInf
if (matchingValueType == ValueType.MAPPING_EXPRESSION_SET) {
Optional<TypeSymbol> paramType = semanticModel.typeOf(value);
if (paramType.isPresent()) {
if (paramType.get().typeKind() == TypeDescKind.MAP) {
matchingValueType = ValueType.MAPPING_EXPRESSION;
// convert string to a Map<String, Object>
Map<String, Object> mapValue = CommonUtils.convertMappingExprToMap(
(MappingConstructorExpressionNode) value);
value(mapValue);
} else if (paramType.get().typeKind() == TypeDescKind.RECORD) {
if (paramType.get().typeKind() == TypeDescKind.RECORD) {
matchingValueType = ValueType.RECORD_MAP_EXPRESSION;
}
}
Expand Down Expand Up @@ -684,6 +677,12 @@ public Builder<T> typeWithExpression(TypeSymbol typeSymbol, ModuleInfo moduleInf
.filter(propType -> propType.fieldType() == finalMatchingValueType)
.findFirst()
.ifPresent(propType -> propType.selected(true));
if (finalMatchingValueType.equals(ValueType.TEXT)) {
String valueStr = value.toSourceCode().strip();
if (builder != null) {
builder.value(CommonUtils.unescapeContent(valueStr));
}
}
}
}
return this;
Expand Down Expand Up @@ -712,8 +711,6 @@ private boolean handlePrimitiveType(TypeSymbol typeSymbol, String ballerinaType)
INT_SIGNED32, INT_UNSIGNED32, BYTE, FLOAT, DECIMAL -> type(ValueType.NUMBER, ballerinaType);
case STRING, STRING_CHAR -> type(ValueType.TEXT, ballerinaType);
case BOOLEAN -> type(ValueType.FLAG, ballerinaType);
case ARRAY -> type(ValueType.EXPRESSION_SET, ballerinaType);
case MAP -> type(ValueType.MAPPING_EXPRESSION, ballerinaType);
case RECORD -> {
if (typeSymbol.typeKind() != TypeDescKind.RECORD && typeSymbol.getModule().isPresent()) {
// not an anonymous record
Expand Down Expand Up @@ -747,7 +744,6 @@ private ValueType findMatchingValueType(Node node) {
case STRING_TEMPLATE_EXPRESSION, STRING_LITERAL -> ValueType.TEXT;
case NUMERIC_LITERAL -> ValueType.NUMBER;
case TRUE_KEYWORD, FALSE_KEYWORD, BOOLEAN_LITERAL -> ValueType.FLAG;
case LIST_BINDING_PATTERN, LIST_CONSTRUCTOR -> ValueType.EXPRESSION_SET;
case MAPPING_BINDING_PATTERN, MAPPING_CONSTRUCTOR -> ValueType.MAPPING_EXPRESSION_SET;
default -> ValueType.EXPRESSION;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,6 @@
"description": "The tools available for the agent"
},
"types": [
{
"fieldType": "EXPRESSION_SET",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
"selected": false
},
{
"fieldType": "EXPRESSION",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
Expand Down Expand Up @@ -661,15 +656,10 @@
"description": "The tools available for the agent"
},
"types": [
{
"fieldType": "EXPRESSION_SET",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
"selected": true
},
{
"fieldType": "EXPRESSION",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
"selected": false
"selected": true
}
],
"value": "[set, sum, mutiply]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,6 @@
"description": "The tools available for the agent"
},
"types": [
{
"fieldType": "EXPRESSION_SET",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
"selected": false
},
{
"fieldType": "EXPRESSION",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
Expand Down Expand Up @@ -662,15 +657,10 @@
"description": "The tools available for the agent"
},
"types": [
{
"fieldType": "EXPRESSION_SET",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
"selected": true
},
{
"fieldType": "EXPRESSION",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
"selected": false
"selected": true
}
],
"value": "[set, sum, mutiply]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,6 @@
"description": "The tools available for the agent"
},
"types": [
{
"fieldType": "EXPRESSION_SET",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
"selected": false
},
{
"fieldType": "EXPRESSION",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
Expand Down Expand Up @@ -661,15 +656,10 @@
"description": "The tools available for the agent"
},
"types": [
{
"fieldType": "EXPRESSION_SET",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
"selected": true
},
{
"fieldType": "EXPRESSION",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
"selected": false
"selected": true
}
],
"value": "[set, sum, mutiply]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,6 @@
"description": "The tools available for the agent"
},
"types": [
{
"fieldType": "EXPRESSION_SET",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
"selected": false
},
{
"fieldType": "EXPRESSION",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
Expand Down Expand Up @@ -687,15 +682,10 @@
"description": "The tools available for the agent"
},
"types": [
{
"fieldType": "EXPRESSION_SET",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
"selected": true
},
{
"fieldType": "EXPRESSION",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
"selected": false
"selected": true
}
],
"value": "[set, sum, mutiply]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,6 @@
"description": "The tools available for the agent"
},
"types": [
{
"fieldType": "EXPRESSION_SET",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
"selected": false
},
{
"fieldType": "EXPRESSION",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
Expand Down Expand Up @@ -865,11 +860,6 @@
"description": "The tools available for the agent"
},
"types": [
{
"fieldType": "EXPRESSION_SET",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
"selected": false
},
{
"fieldType": "EXPRESSION",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,6 @@
"description": "The tools available for the agent"
},
"types": [
{
"fieldType": "EXPRESSION_SET",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
"selected": false
},
{
"fieldType": "EXPRESSION",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
Expand Down Expand Up @@ -667,11 +662,6 @@
"description": "The tools available for the agent"
},
"types": [
{
"fieldType": "EXPRESSION_SET",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
"selected": false
},
{
"fieldType": "EXPRESSION",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,6 @@
"description": "The tools available for the agent"
},
"types": [
{
"fieldType": "EXPRESSION_SET",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
"selected": false
},
{
"fieldType": "EXPRESSION",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,6 @@
"description": "The tools available for the agent"
},
"types": [
{
"fieldType": "EXPRESSION_SET",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
"selected": false
},
{
"fieldType": "EXPRESSION",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,6 @@
"description": "The tools available for the agent"
},
"types": [
{
"fieldType": "EXPRESSION_SET",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
"selected": false
},
{
"fieldType": "EXPRESSION",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,6 @@
"description": "The tools available for the agent"
},
"types": [
{
"fieldType": "EXPRESSION_SET",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
"selected": false
},
{
"fieldType": "EXPRESSION",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,6 @@
"description": "The tools available for the agent"
},
"types": [
{
"fieldType": "EXPRESSION_SET",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
"selected": false
},
{
"fieldType": "EXPRESSION",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,6 @@
"description": "The tools available for the agent"
},
"types": [
{
"fieldType": "EXPRESSION_SET",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
"selected": false
},
{
"fieldType": "EXPRESSION",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,6 @@
"description": "The tools available for the agent"
},
"types": [
{
"fieldType": "EXPRESSION_SET",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
"selected": false
},
{
"fieldType": "EXPRESSION",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
Expand Down Expand Up @@ -682,15 +677,10 @@
"description": "The tools available for the agent"
},
"types": [
{
"fieldType": "EXPRESSION_SET",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
"selected": true
},
{
"fieldType": "EXPRESSION",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
"selected": false
"selected": true
}
],
"value": "[]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,6 @@
"description": "The tools available for the agent"
},
"types": [
{
"fieldType": "EXPRESSION_SET",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
"selected": false
},
{
"fieldType": "EXPRESSION",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
Expand Down Expand Up @@ -682,15 +677,10 @@
"description": "The tools available for the agent"
},
"types": [
{
"fieldType": "EXPRESSION_SET",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
"selected": true
},
{
"fieldType": "EXPRESSION",
"ballerinaType": "(ai:BaseToolKit|ai:ToolConfig|ai:FunctionTool)[]",
"selected": false
"selected": true
}
],
"value": "[]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,6 @@
"description": "The entity headers"
},
"types": [
{
"fieldType": "MAPPING_EXPRESSION",
"ballerinaType": "map<string|string[]>",
"selected": false
},
{
"fieldType": "EXPRESSION",
"ballerinaType": "map<string|string[]>?",
Expand Down Expand Up @@ -548,11 +543,6 @@
"description": "The entity headers"
},
"types": [
{
"fieldType": "MAPPING_EXPRESSION",
"ballerinaType": "map<string|string[]>",
"selected": false
},
{
"fieldType": "EXPRESSION",
"ballerinaType": "map<string|string[]>?",
Expand Down
Loading
Loading