v1.8.14#245
Merged
Merged
Conversation
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.
Update translations
Update Translations
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
getDefaultPromptinttscast.ajax.phpto fetch the default system prompt from the daemon, returning an error if the daemon is not running.Error handling improvements:
ttscast.ajax.phpby 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:
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: