Skip to content

v1.8.14#245

Merged
TiTidom-RC merged 17 commits into
mainfrom
beta
May 16, 2026
Merged

v1.8.14#245
TiTidom-RC merged 17 commits into
mainfrom
beta

Conversation

@TiTidom-RC
Copy link
Copy Markdown
Owner

This pull request introduces a new AJAX action to retrieve the default system prompt from the daemon and improves internationalization support across multiple languages. It also simplifies error handling in the AJAX controller and updates translation files to include new strings and correct existing ones.

Core feature addition:

  • Added a new AJAX action getDefaultPrompt in ttscast.ajax.php to fetch the default system prompt from the daemon, returning an error if the daemon is not running.

Error handling improvements:

  • Simplified exception handling in ttscast.ajax.php by returning the exception message directly in AJAX errors instead of using a custom display function.

Internationalization updates:

Language support for new feature and related UI:

  • Added and updated translations for the new default prompt feature and related UI strings in French, German, English, Spanish, and Italian translation files (de_DE.json, en_US.json, es_ES.json, it_IT.json). This includes strings like "Le démon n'est pas démarré", "Prompt Système par Défaut", and descriptions for displaying the default prompt. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16]

Corrections and consistency:

  • Updated example translations for tone and removed obsolete or duplicate strings in all supported languages to ensure consistency and accuracy. [1] [2] [3] [4] [5] [6] [7] [8]

TiTidom-RC added 17 commits May 14, 2026 11:57
Refresh available TTS AI models and pricing tooltip: set default to gemini-3.1-flash-lite, add Gemini 3.1 options, mark "Latest" models with a warning, adjust Preview entries and remove older Generation 2.0 entries. Also bump plugin version to 1.8.13 and upgrade google-genai dependency from 1.72.0 to 2.2.0.
Replace the single-line French system prompt with a structured, multi-line prompt to improve clarity and readability. The new prompt explicitly instructs the assistant to reformulate announcements and answer questions, preserve numeric values, verify temporal information and factual/current data via web search, allow line breaks for readability, and never use emojis or Markdown. Tone selection via aiDefaultTone (or aiCustomTone) is preserved.
Use repr() when logging the system instruction and raw Gemini response to make control characters and whitespace visible. Introduce intermediate variables (raw_text, clean_text), log the cleaned Markdown-stripped output, and return the sanitized text. This improves debug visibility of AI prompts/responses and clarifies the post-processing step in TTSCast (resources/ttscastd/ttscastd.py).
Expose the AI system default prompt so users can view it from the plugin settings. Added an AJAX action (getDefaultPrompt) in core/ajax/ttscast.ajax.php, a button and readonly textarea in plugin_info/configuration.php plus client-side JS to request and display the prompt, and a synchronous daemon handler TTSCast.handleGetDefaultPrompt in resources/ttscastd/ttscastd.py (registered with the socket handlers). The AJAX call surfaces an error if the daemon is not running; the daemon handler returns the prompt via myConfig.aiSysPrompt().
Replace thrown Exception with ajax::error in getDefaultPrompt handling so the endpoint returns a proper AJAX error response when the TTS daemon is not running. This ensures clients receive a structured error instead of an exception.
Replace direct ajax::error call with throwing an Exception when the TTS daemon is not started (getDefaultPrompt path), so the catch block can handle errors consistently. Also simplify the catch to return the exception message ($e->getMessage()) instead of displayException($e). This centralizes error handling and avoids sending formatted exception details directly.
Change Bootstrap column class from col-lg-3 to col-lg-9 for the Default System Prompt section so the 'Afficher' button and result textarea have more horizontal space, improving layout and readability.
Lowercase the default AI tone string for consistency between UI and backend (resources/ttscastd/utils.py) and update the configuration form (plugin_info/configuration.php): adjust the placeholder casing and reduce the prompt display column from col-lg-9 to col-lg-6 to better fit the "Afficher" button and textarea. These changes keep wording consistent and improve the prompt display layout.
Clarify and simplify French assistant guidelines: remove the explicit "confirmer" phrasing for temporal checks, shorten the instruction about verifying dates/weekdays via online search, and replace formatting bullets with explicit guidance to use short, fluid sentences suitable for vocalization and plain text without emojis or Markdown.
Add a new "Gemini 3.1 Flash-Lite Preview" entry to the AI model dropdown and update the pricing tooltip to include Flash-Lite Preview pricing and reorder preview model lines for clarity.
added "Gemini 3.1 Flash-Lite Preview"
Enhance TTS callback log in core/php/jeettscast.php to include the device name and the actual message text for clearer debugging and context. Also update plugin version in plugin_info/info.json from 1.8.13 to 1.8.14.
@TiTidom-RC TiTidom-RC merged commit 18ad40b into main May 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant