From cbd7920eb61b68de5c8a730caba046c395608292 Mon Sep 17 00:00:00 2001 From: seb Date: Wed, 7 Oct 2026 11:41:15 +0200 Subject: [PATCH] u --- docs/api/routes/category/articles.md | 2 +- src/api/routes/category.js | 5 +++-- src/services/conversationManager.js | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/api/routes/category/articles.md b/docs/api/routes/category/articles.md index 5d5543b..c156c02 100644 --- a/docs/api/routes/category/articles.md +++ b/docs/api/routes/category/articles.md @@ -4,7 +4,7 @@ Protected. Requires a valid session cookie (`credentials: 'include'`). Articles in category -Returns articles in a category the user is authorized for (omits child articles of a parent article). Each article includes `childCount` (the number of its child articles). +Returns articles in a category the user is authorized for (omits child articles of a parent article), sorted alphabetically by name. Each article includes `childCount` (the number of its child articles). ## Path parameters diff --git a/src/api/routes/category.js b/src/api/routes/category.js index 04df698..9ac2644 100644 --- a/src/api/routes/category.js +++ b/src/api/routes/category.js @@ -304,7 +304,7 @@ export function register(app, basePath = '') { * get: * tags: [Category] * summary: Articles in category - * description: Returns articles in a category the user is authorized for (omits child articles of a parent article). Each article includes `childCount` (the number of its child articles). + * description: Returns articles in a category the user is authorized for (omits child articles of a parent article), sorted alphabetically by name. Each article includes `childCount` (the number of its child articles). * security: * - cookieAuth: [] * x-markdown: category/articles.md @@ -401,7 +401,8 @@ export function register(app, basePath = '') { ...a, childCount: Number(a.childCount ?? 0), isParent: Boolean(a.isParent ?? a.is_parent), - })); + })) + .sort((a, b) => (a.name ?? '').localeCompare(b.name ?? '') || a.id - b.id); res.status(200).json({ articles }); } catch (error) { const status = categoryErrorStatus(error); diff --git a/src/services/conversationManager.js b/src/services/conversationManager.js index 954c52e..652b713 100644 --- a/src/services/conversationManager.js +++ b/src/services/conversationManager.js @@ -848,9 +848,9 @@ export class ConversationManager { }); const reasoningEffort = await resolveModelReasoning(googleAuthId); - const extraBody = reasoningEffort && reasoningEffort !== 'none' + const extraBody = reasoningEffort ? { reasoning: { effort: reasoningEffort } } - : { reasoning: undefined }; + : {}; const result = await this.orbiter.run({ messages,