Skip to content

Commit 32809db

Browse files
committed
🤖 Apply quick-fixes by Qodana
1 parent f193256 commit 32809db

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

‎agents/agents-tools/src/commonMain/kotlin/ai/koog/agents/core/tools/ToolDescriptors.kt

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,22 @@ public sealed class ToolParameterType(public val name: kotlin.String) {
7575
*/
7676
public data class Enum(
7777
val entries: Array<kotlin.String>,
78-
) : ToolParameterType("ENUM")
78+
) : ToolParameterType("ENUM") {
79+
override fun equals(other: Any?): Boolean {
80+
if (this === other) return true
81+
if (other == null || this::class != other::class) return false
82+
83+
other as Enum
84+
85+
if (!entries.contentEquals(other.entries)) return false
86+
87+
return true
88+
}
89+
90+
override fun hashCode(): Int {
91+
return entries.contentHashCode()
92+
}
93+
}
7994

8095
/**
8196
* Represents an array type parameter.

0 commit comments

Comments
 (0)