发布

  • [OPIK-3574] [FE] Add visual indication that chat prompt is invalid (#4529)

    frostbyte_neo 发布于 2025-12-23 14:38:23 +00:00

    • [OPIK-3574] [FE] Add error message display for invalid chat prompt

    • Add role "alert" for assistive technology users

    • Add unit tests for JSON validation in ChatPromptRawView

    • Introduced comprehensive tests for the validateAndParseJson function, covering various invalid input scenarios including empty strings, malformed JSON, and invalid message structures.
    • Added tests for valid message arrays to ensure correct parsing and validation of messages with different roles and content types.
    • Exported the validateAndParseJson function for testing purposes.
    • Updated the ChatPromptRawView component to use hooks for state management.
    • fix linter errors
    下载附件