Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
c3864df
feat(streaming): update task output while polling, display form if th…
julien-nc May 13, 2026
80a5d9f
feat(streaming): show notify and cancel buttons in the task header wh…
julien-nc May 13, 2026
30cbcf3
feat(streaming): adjust chat UI to display intermediate/streaming mes…
julien-nc May 13, 2026
e7f547f
make the dialog initial width 70%
julien-nc May 13, 2026
88fbc39
add a loading icon in the output form while streaming
julien-nc May 13, 2026
2dd86bc
add @nextcloud/notify_push
julien-nc May 13, 2026
9231264
feat(streaming): use notify_push to get the polled task's output
julien-nc May 13, 2026
b3914d5
feat(streaming): use notify_push to get the polled chat message gener…
julien-nc May 13, 2026
8d026fb
start listening to notify_push messages when loading a task in the ge…
julien-nc May 18, 2026
f13037a
prevent listening notify push msgs twice for the same task after swit…
julien-nc May 18, 2026
e6a7be7
regenerate openapi specs, fix psalm issue
julien-nc May 18, 2026
2682d29
add simple pulse animation to output fields when streaming
julien-nc May 18, 2026
58066e3
start listening to notify_push messages when loading a task from a no…
julien-nc May 19, 2026
ca2f6ed
add pulse animation to 'getting results...' label
julien-nc May 19, 2026
9933157
disable all animations when prefers-reduced-motion is enabled
julien-nc May 19, 2026
b0da3bc
remove form header title blink animation, use the copy button in text…
julien-nc May 19, 2026
0bcdec2
polish chat UI
julien-nc May 20, 2026
e8264c5
make sure we handle the case where there is no push message body
julien-nc May 20, 2026
aba99ad
do not update the output when polling while streaming
julien-nc May 20, 2026
d81852b
fix small old mistakes
julien-nc May 20, 2026
a052abd
handle the cases where there is no selected task in AssistantPage or …
julien-nc May 20, 2026
d77cf32
scroll output text fields to bottom while streaming
julien-nc May 21, 2026
7f24480
nothing
julien-nc May 28, 2026
d195ad0
do not update the chat task output if we know notify_push is available
julien-nc Jun 1, 2026
cde4d40
use NcNoteCard for the running action buttons in the classic form whi…
julien-nc Jun 2, 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 @@ -4856,6 +4856,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