+ )
+}
diff --git a/apps/course-builder-web/src/app/tips/_components/edit-tip-form.tsx b/apps/course-builder-web/src/app/tips/_components/edit-tip-form.tsx
index 49abd4656..f1bbc8c65 100644
--- a/apps/course-builder-web/src/app/tips/_components/edit-tip-form.tsx
+++ b/apps/course-builder-web/src/app/tips/_components/edit-tip-form.tsx
@@ -24,13 +24,13 @@ import {useRouter} from 'next/navigation'
import {type Tip} from '@/lib/tips'
import {TipAssistant} from './tip-assistant'
import Link from 'next/link'
-import {CodemirrorEditor} from '@/app/tips/_components/codemirror'
import {ImagePlusIcon, ZapIcon} from 'lucide-react'
import {CloudinaryUploadWidget} from './cloudinary-upload-widget'
import {CloudinaryMediaBrowser} from './cloudinary-media-browser'
import {cn} from '@/lib/utils'
import {FeedbackMarker} from '@/lib/feedback-marker'
import {useSocket} from '@/hooks/use-socket'
+import {CodemirrorEditor} from '@/app/_components/codemirror'
const NewTipFormSchema = z.object({
title: z.string().min(2).max(90),
diff --git a/apps/course-builder-web/src/inngest/functions/ai/feedback-markers.ts b/apps/course-builder-web/src/inngest/functions/ai/feedback-markers.ts
index 579206675..f227ec659 100644
--- a/apps/course-builder-web/src/inngest/functions/ai/feedback-markers.ts
+++ b/apps/course-builder-web/src/inngest/functions/ai/feedback-markers.ts
@@ -11,7 +11,7 @@ export const generateFeedbackMarkers = inngest.createFunction(
name: 'Generate Feedback Markers',
debounce: {
key: 'event.data.resourceId',
- period: '5s',
+ period: '15s',
},
},
{event: BODY_TEXT_UPDATED},
@@ -47,6 +47,10 @@ export const generateFeedbackMarkers = inngest.createFunction(
* don't waste our time with feedback that is not actionable
* harsh feedback is OK, no need to spare our feelings
* act like the authority that you are
+ * do keep the feedback premium and useful
+ * do exclude feedback that is marginal or not actionable
+ * focus on ideas over grammar
+ * limit the feedback to the the top three issues
## Feedback Marker Zod Schema
@@ -72,7 +76,7 @@ export const generateFeedbackMarkers = inngest.createFunction(
${JSON.stringify(event.data.currentFeedback)}
- ## Template\n\n{markers:[{"originalText": "quoted from the text", "feedback": "useful feedback", "fullSuggestedChange": "rewritten text that captures the feedback meaningfully", "level": "critical", "type": "grammar"}]}`,
+ ## Template\n\n{markers:[{"originalText": "quoted from the text", "feedback": "useful feedback", "fullSuggestedChange": "rewritten text that captures the feedback meaningfully", "level": "how much attention is needed?", "type": "a single word that describes the type of change"}]}`,
role: 'system',
},
{
diff --git a/apps/course-builder-web/src/inngest/functions/articles/chat.ts b/apps/course-builder-web/src/inngest/functions/articles/chat.ts
index ca517ff74..fd1940769 100644
--- a/apps/course-builder-web/src/inngest/functions/articles/chat.ts
+++ b/apps/course-builder-web/src/inngest/functions/articles/chat.ts
@@ -60,6 +60,15 @@ export const articleChat = inngest.createFunction(
})
if (messages.length === 1 && systemPrompt) {
+ if (event.data.currentFeedback) {
+ messages = [
+ {
+ content: JSON.stringify(event.data.currentFeedback),
+ role: 'assistant',
+ },
+ ...messages,
+ ]
+ }
messages = [systemPrompt, ...messages]
}