Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
8cb2908
feat(streaming): update task output while polling, display form if th…
julien-nc May 13, 2026
21e41db
feat(streaming): show notify and cancel buttons in the task header wh…
julien-nc May 13, 2026
9cbb8e0
feat(streaming): adjust chat UI to display intermediate/streaming mes…
julien-nc May 13, 2026
1feb53b
make the dialog initial width 70%
julien-nc May 13, 2026
6f4626a
add a loading icon in the output form while streaming
julien-nc May 13, 2026
12f8ef6
add @nextcloud/notify_push
julien-nc May 13, 2026
0523281
feat(streaming): use notify_push to get the polled task's output
julien-nc May 13, 2026
7c6cde0
feat(streaming): use notify_push to get the polled chat message gener…
julien-nc May 13, 2026
ed20d39
start listening to notify_push messages when loading a task in the ge…
julien-nc May 18, 2026
c8ab215
prevent listening notify push msgs twice for the same task after swit…
julien-nc May 18, 2026
57a13b8
regenerate openapi specs, fix psalm issue
julien-nc May 18, 2026
1f43eb6
add simple pulse animation to output fields when streaming
julien-nc May 18, 2026
fdc9e63
start listening to notify_push messages when loading a task from a no…
julien-nc May 19, 2026
6a9709b
add pulse animation to 'getting results...' label
julien-nc May 19, 2026
a44089d
disable all animations when prefers-reduced-motion is enabled
julien-nc May 19, 2026
c5267bd
remove form header title blink animation, use the copy button in text…
julien-nc May 19, 2026
4d2e520
polish chat UI
julien-nc May 20, 2026
883b0d0
make sure we handle the case where there is no push message body
julien-nc May 20, 2026
7405284
do not update the output when polling while streaming
julien-nc May 20, 2026
5b3d85d
fix small old mistakes
julien-nc May 20, 2026
6fc1aaf
handle the cases where there is no selected task in AssistantPage or …
julien-nc May 20, 2026
fd4b2a2
scroll output text fields to bottom while streaming
julien-nc May 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions lib/Controller/ChattyLLMController.php
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ public function regenerateForSession(int $sessionId, int $messageId): JSONRespon
*
* @param int $taskId The message generation task ID
* @param int $sessionId The chat session ID
* @return JSONResponse<Http::STATUS_OK, AssistantChatAgencyMessage, array{}>|JSONResponse<Http::STATUS_EXPECTATION_FAILED, array{task_status: int, slow_pickup: bool}, array{}>|JSONResponse<Http::STATUS_INTERNAL_SERVER_ERROR|Http::STATUS_UNAUTHORIZED|Http::STATUS_BAD_REQUEST|Http::STATUS_NOT_FOUND, array{error: string}, array{}>
* @return JSONResponse<Http::STATUS_OK, AssistantChatAgencyMessage, array{}>|JSONResponse<Http::STATUS_EXPECTATION_FAILED, array{task_status: int, slow_pickup: bool, task_output?: array<string, list<numeric|string>|numeric|string>|null}, array{}>|JSONResponse<Http::STATUS_INTERNAL_SERVER_ERROR|Http::STATUS_UNAUTHORIZED|Http::STATUS_BAD_REQUEST|Http::STATUS_NOT_FOUND, array{error: string}, array{}>
* @throws MultipleObjectsReturnedException
* @throws \OCP\DB\Exception
*
Expand Down Expand Up @@ -599,7 +599,14 @@ public function checkMessageGenerationTask(int $taskId, int $sessionId): JSONRes
} elseif ($task->getstatus() === Task::STATUS_RUNNING || $task->getstatus() === Task::STATUS_SCHEDULED) {
$startTime = $task->getStartedAt() ?? time();
$slowPickup = ($task->getScheduledAt() + (60 * 5)) < $startTime;
return new JSONResponse(['task_status' => $task->getstatus(), 'slow_pickup' => $slowPickup], Http::STATUS_EXPECTATION_FAILED);
$responsePayload = [
'task_status' => $task->getstatus(),
'slow_pickup' => $slowPickup,
];
if ($task->getstatus() === Task::STATUS_RUNNING) {
$responsePayload['task_output'] = $task->getOutput();
}
return new JSONResponse($responsePayload, Http::STATUS_EXPECTATION_FAILED);
} elseif ($task->getstatus() === Task::STATUS_FAILED || $task->getstatus() === Task::STATUS_CANCELLED) {
return new JSONResponse(['error' => 'task_failed_or_canceled', 'task_status' => $task->getstatus()], Http::STATUS_BAD_REQUEST);
}
Expand Down
27 changes: 27 additions & 0 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -4852,6 +4852,33 @@
},
"slow_pickup": {
"type": "boolean"
},
"task_output": {
"type": "object",
"nullable": true,
"additionalProperties": {
"oneOf": [
{
"type": "array",
"items": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
]
}
},
{
"type": "number"
},
{
"type": "string"
}
]
}
}
}
}
Expand Down
Loading
Loading