Skip to content

Commit 41fd86a

Browse files
committed
Fix bugs
1 parent 382c4fa commit 41fd86a

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

src/messages/entities/message.entity.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ import { Conversation } from 'src/conversations/entities/conversation.entity';
99
import { User } from 'src/user/user.entity';
1010
import { Base } from 'src/common/base.entity';
1111

12+
/**
13+
* Every message has a `parentId` that points to its preceding message.
14+
* This structure supports two main scenarios:
15+
*
16+
* 1. **Regenerating the LLM’s response**
17+
* - Retrying a failed or incomplete response
18+
* - Replacing a response that was inaccurate or irrelevant
19+
* 2. **Editing the user’s query message**
20+
*/
1221
@Entity('messages')
1322
export class Message extends Base {
1423
@PrimaryGeneratedColumn('uuid')

src/resources/resources.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ export class ResourcesService {
118118
const hasPermission: boolean =
119119
await this.permissionsService.userHasPermission(
120120
namespaceId,
121-
userId,
122121
res.id,
122+
userId,
123123
);
124124
if (hasPermission) {
125125
filteredResources.push(res);

src/wizard/stream.service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ export class StreamService {
201201
tool.namespace_id,
202202
parentId,
203203
user.id,
204+
true,
204205
);
205206
resourceIds.push(...resources.map((res) => res.id));
206207
}

0 commit comments

Comments
 (0)