Skip to content

Commit cc14a82

Browse files
committed
refactor: remove ignoredChecklistTopics from Note and related components
- Deleted the ignoredChecklistTopics property from Note, InitialInfo, and OpenAPI documentation. - Removed associated logic in MemoryTrackerService and QuestionGenerationRequestBuilder. - Updated generated TypeScript types to reflect the removal of ignoredChecklistTopics. Co-authored-by: terry <[email protected]>
1 parent 29200db commit cc14a82

File tree

8 files changed

+1
-32
lines changed

8 files changed

+1
-32
lines changed

backend/src/main/java/com/odde/doughnut/controllers/dto/InitialInfo.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@
33
public class InitialInfo {
44
public Integer noteId;
55
public Boolean skipMemoryTracking;
6-
public String ignoredChecklistTopics;
76
}

backend/src/main/java/com/odde/doughnut/entities/Note.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,6 @@ public class Note extends EntityIdentifiedByIdOnly {
135135
@JsonIgnore
136136
private List<PredefinedQuestion> predefinedQuestions = new ArrayList<>();
137137

138-
@Column(name = "ignored_checklist_topics")
139-
@Getter
140-
@Setter
141-
private String ignoredChecklistTopics;
142-
143138
@Embedded @JsonIgnore @Getter private NoteRecallSetting recallSetting = new NoteRecallSetting();
144139

145140
@JsonIgnore
@@ -395,11 +390,4 @@ private boolean allowed(Note l, User viewer) {
395390
if (viewer == null) return false;
396391
return viewer.canReferTo(l.getParent().getNotebook());
397392
}
398-
399-
public boolean ShouldIgnoreTopic() {
400-
if (ignoredChecklistTopics != null && !ignoredChecklistTopics.isEmpty()) {
401-
return true;
402-
}
403-
return false;
404-
}
405393
}

backend/src/main/java/com/odde/doughnut/services/MemoryTrackerService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ public List<MemoryTracker> findLast100ReviewedByUser(Integer userId) {
4646
public List<MemoryTracker> assimilate(
4747
InitialInfo initialInfo, User currentUser, Timestamp currentTime) {
4848
Note note = entityPersister.find(Note.class, initialInfo.noteId);
49-
note.setIgnoredChecklistTopics(initialInfo.ignoredChecklistTopics);
5049

5150
MemoryTracker memoryTracker =
5251
createMemoryTracker(

backend/src/main/java/com/odde/doughnut/services/QuestionGenerationRequestBuilder.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ public OpenAIChatRequestBuilder getChatRequestBuilder(Note note) {
5454
.model(modelName)
5555
.addUserMessage(noteInstructions + noteDescription);
5656

57-
if (note.ShouldIgnoreTopic())
58-
builder.addUserMessage("Ignore the topic '" + note.getIgnoredChecklistTopics() + "'");
5957
return builder;
6058
}
6159
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE note DROP COLUMN ignored_checklist_topics;

generated/backend/types.gen.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ export type Note = {
120120
createdAt: string;
121121
readonly deletedAt?: string;
122122
wikidataId?: string;
123-
ignoredChecklistTopics?: string;
124123
};
125124

126125
export type NoteTopology = {
@@ -396,7 +395,6 @@ export type TextFromAudioWithCallInfo = {
396395
export type InitialInfo = {
397396
noteId?: number;
398397
skipMemoryTracking?: boolean;
399-
ignoredChecklistTopics?: string;
400398
};
401399

402400
export type AssessmentAttempt = {
@@ -628,7 +626,6 @@ export type NoteWritable = {
628626
id: number;
629627
createdAt: string;
630628
wikidataId?: string;
631-
ignoredChecklistTopics?: string;
632629
};
633630

634631
export type SubscriptionWritable = {

ongoing/remove_rephrase_note_point.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

open_api_docs.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3707,8 +3707,6 @@ components:
37073707
readOnly: true
37083708
wikidataId:
37093709
type: string
3710-
ignoredChecklistTopics:
3711-
type: string
37123710
required:
37133711
- createdAt
37143712
- id
@@ -4303,8 +4301,6 @@ components:
43034301
format: int32
43044302
skipMemoryTracking:
43054303
type: boolean
4306-
ignoredChecklistTopics:
4307-
type: string
43084304
AssessmentAttempt:
43094305
type: object
43104306
properties:

0 commit comments

Comments
 (0)