File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,15 @@ import { Conversation } from 'src/conversations/entities/conversation.entity';
99import { User } from 'src/user/user.entity' ;
1010import { 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' )
1322export class Message extends Base {
1423 @PrimaryGeneratedColumn ( 'uuid' )
Original file line number Diff line number Diff 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 ) ;
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments