Skip to content

Commit 93a014e

Browse files
authored
Merge pull request #670 from nextcloud/fix/648/migrate-off-oca-viewer
Migrate off OCA.Viewer
2 parents 7466db4 + 734cee8 commit 93a014e

8 files changed

Lines changed: 996 additions & 215 deletions

File tree

‎lib/Controller/AssistantApiController.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ public function shareOutputFile(int $ocpTaskId, int $fileId): DataResponse {
321321
*
322322
* @param int $ocpTaskId The task ID
323323
* @param int $fileId The file ID
324-
* @return DataResponse<Http::STATUS_OK, array{shareToken: string}, array{}>|DataResponse<Http::STATUS_NOT_FOUND, array{error: string}, array{}>
324+
* @return DataResponse<Http::STATUS_OK, array{fileId: int, path: string, mime: string}, array{}>|DataResponse<Http::STATUS_NOT_FOUND, array{error: string}, array{}>
325325
*
326326
* 200: The file was saved
327327
* 404: The file was not found

‎lib/ResponseDefinitions.php‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
* attachments: list<array{type: string, fileId: int}>,
7373
* ocp_task_id: int,
7474
* sources: string,
75+
* reasoning: ?string,
7576
* }
7677
*
7778
* @psalm-type AssistantChatAgencyMessage = AssistantChatMessage&array{

‎lib/Service/AssistantService.php‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,7 @@ public function saveOutputFile(string $userId, int $ocpTaskId, int $fileId): arr
749749
return [
750750
'fileId' => $fileCopy->getId(),
751751
'path' => preg_replace('/^files\//', '/', $fileCopy->getInternalPath()),
752+
'mime' => $fileCopy->getMimeType(),
752753
];
753754
}
754755

‎openapi.json‎

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@
9999
"timestamp",
100100
"attachments",
101101
"ocp_task_id",
102-
"sources"
102+
"sources",
103+
"reasoning"
103104
],
104105
"properties": {
105106
"id": {
@@ -145,6 +146,10 @@
145146
},
146147
"sources": {
147148
"type": "string"
149+
},
150+
"reasoning": {
151+
"type": "string",
152+
"nullable": true
148153
}
149154
}
150155
},
@@ -2189,10 +2194,19 @@
21892194
"data": {
21902195
"type": "object",
21912196
"required": [
2192-
"shareToken"
2197+
"fileId",
2198+
"path",
2199+
"mime"
21932200
],
21942201
"properties": {
2195-
"shareToken": {
2202+
"fileId": {
2203+
"type": "integer",
2204+
"format": "int64"
2205+
},
2206+
"path": {
2207+
"type": "string"
2208+
},
2209+
"mime": {
21962210
"type": "string"
21972211
}
21982212
}

0 commit comments

Comments
 (0)