mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
16 lines
463 B
Text
16 lines
463 B
Text
language js
|
|
|
|
// Chat models may omit `type`, so a direct comparison with "chat" misses them.
|
|
or {
|
|
`$model.type === "chat"`,
|
|
`$model.type !== "chat"`,
|
|
`$model.type == "chat"`,
|
|
`$model.type != "chat"`,
|
|
`"chat" === $model.type`,
|
|
`"chat" !== $model.type`
|
|
} as $comparison where {
|
|
register_diagnostic(
|
|
span = $comparison,
|
|
message = "Chat models may omit type. Use isModelType(model, 'chat') or getModelType(model) instead of comparing type to 'chat'."
|
|
)
|
|
}
|