Enhance exercise_ai and openrouter_chat modules with AI debugging and improved content handling
Test Suite / lint-backend (push) Waiting to run
Test Suite / build-frontend (push) Waiting to run
Test Suite / k6 /health Baseline (push) Waiting to run
Test Suite / playwright-tests (push) Waiting to run
Deploy Development / deploy (push) Successful in 42s
Test Suite / pytest-backend (push) Has been cancelled
Test Suite / lint-backend (push) Waiting to run
Test Suite / build-frontend (push) Waiting to run
Test Suite / k6 /health Baseline (push) Waiting to run
Test Suite / playwright-tests (push) Waiting to run
Deploy Development / deploy (push) Successful in 42s
Test Suite / pytest-backend (push) Has been cancelled
- Introduced detailed logging for AI operations in the `exercise_ai` and `openrouter_chat` modules, activated by the `SHINKAN_AI_DEBUG` environment variable, to aid in debugging and performance monitoring. - Updated the `run_exercise_ai_suggestion` function to log prompt lengths, response sizes, and JSON parsing errors, enhancing transparency in AI interactions. - Improved the `_flatten_message_content` function to handle nested content structures more effectively, ensuring compatibility with various AI response formats. - Incremented the application version to 0.8.157 and updated the changelog to reflect these enhancements, including new logging features and content handling improvements.
This commit is contained in:
1 parent
a28a9d399a
commit
1942585546
5 files changed
+169
-39
No files matched your search
@@ -992,6 +992,8 @@ function ExerciseFormPageRoot() {
|
||||
return a.focus_area_id - b.focus_area_id
|
||||
})
|
||||
|
||||
/* Vor jedem neuen Aufruf: Vorschau schließen; sonst bleiben die KI-Buttons wegen Modal-Zustand dauerhaft deaktiviert. */
|
||||
setAiSuggestionPreview(null)
|
||||
setAiSuggestBusy(true)
|
||||
try {
|
||||
const res = await api.suggestExerciseAi({
|
||||
@@ -1541,7 +1543,7 @@ function ExerciseFormPageRoot() {
|
||||
type="button"
|
||||
className="btn btn-secondary"
|
||||
style={{ fontSize: '12px' }}
|
||||
disabled={aiSuggestBusy || !!aiSuggestionPreview}
|
||||
disabled={aiSuggestBusy}
|
||||
onClick={() => runExerciseAiSuggestion('summary')}
|
||||
>
|
||||
KI: Kurzfassung
|
||||
@@ -2216,7 +2218,7 @@ function ExerciseFormPageRoot() {
|
||||
type="button"
|
||||
className="btn btn-secondary"
|
||||
style={{ fontSize: '12px' }}
|
||||
disabled={aiSuggestBusy || !!aiSuggestionPreview}
|
||||
disabled={aiSuggestBusy}
|
||||
onClick={() => runExerciseAiSuggestion('skills')}
|
||||
>
|
||||
KI: Fähigkeiten
|
||||
@@ -2225,7 +2227,7 @@ function ExerciseFormPageRoot() {
|
||||
type="button"
|
||||
className="btn btn-secondary"
|
||||
style={{ fontSize: '12px' }}
|
||||
disabled={aiSuggestBusy || !!aiSuggestionPreview}
|
||||
disabled={aiSuggestBusy}
|
||||
onClick={() => runExerciseAiSuggestion('both')}
|
||||
>
|
||||
KI: Kurzfassung und Fähigkeiten
|
||||
|
||||
Reference in new issue
Block a user