-
Notifications
You must be signed in to change notification settings - Fork 2
agent: @U0AJM7X8FBR @U0AJM7X8FBR become an expert at this repo https://github.c #92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| export const NEW_API_BASE_URL = "https://recoup-api.vercel.app"; | ||
| export const RECOUP_API_KEY = process.env.RECOUP_API_KEY; | ||
| export const CODING_AGENT_ACCOUNT_ID = "04e3aba9-c130-4fb8-8b92-34e95d43e66b"; | ||
| export const OPENCLAW_DEFAULT_MODEL = "vercel-ai-gateway/anthropic/claude-sonnet-4.6"; | ||
| export const OPENCLAW_DEFAULT_MODEL = "vercel-ai-gateway/anthropic/claude-sonnet-4.6"; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,20 @@ | ||
| /** | ||
| * Fetches audience context (audience.md) from GitHub. | ||
| * Returns placeholder if not found. | ||
| * | ||
| * @param githubRepo | ||
| * @param artistSlug | ||
| * @param fetchFile | ||
| */ | ||
| export async function fetchAudienceContext( | ||
| githubRepo: string, | ||
| artistSlug: string, | ||
| fetchFile: (repo: string, path: string) => Promise<Buffer | null>, | ||
| ): Promise<string> { | ||
| const buffer = await fetchFile( | ||
| githubRepo, | ||
| `artists/${artistSlug}/context/audience.md`, | ||
| ); | ||
| const buffer = await fetchFile(githubRepo, `artists/${artistSlug}/context/audience.md`); | ||
| if (!buffer) return "(no audience context available)"; | ||
| return buffer.toString("utf-8").replace(/^---[\s\S]*?---\s*/, "").trim(); | ||
| return buffer | ||
| .toString("utf-8") | ||
| .replace(/^---[\s\S]*?---\s*/, "") | ||
| .trim(); | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -4,8 +4,10 @@ import type { SongLyrics } from "./transcribeSong"; | |||||||||||||||||||||||||||||||||||||
| import type { CaptionLength } from "../schemas/contentCreationSchema"; | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| const CAPTION_LENGTH_INSTRUCTIONS: Record<CaptionLength, string> = { | ||||||||||||||||||||||||||||||||||||||
| short: "Write a SHORT caption (max 10 words). Punchy, minimal, like a text message. Think: one phrase that hits.", | ||||||||||||||||||||||||||||||||||||||
| medium: "Write a MEDIUM caption (15-30 words). A complete thought with feeling. 1-2 sentences max.", | ||||||||||||||||||||||||||||||||||||||
| short: | ||||||||||||||||||||||||||||||||||||||
| "Write a SHORT caption (max 10 words). Punchy, minimal, like a text message. Think: one phrase that hits.", | ||||||||||||||||||||||||||||||||||||||
| medium: | ||||||||||||||||||||||||||||||||||||||
| "Write a MEDIUM caption (15-30 words). A complete thought with feeling. 1-2 sentences max.", | ||||||||||||||||||||||||||||||||||||||
| long: "Write a LONG caption (40-80 words). A mini-story or stream of consciousness. Vulnerable, raw, the kind of caption people screenshot.", | ||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
|
|
@@ -14,6 +16,15 @@ const CAPTION_LENGTH_INSTRUCTIONS: Record<CaptionLength, string> = { | |||||||||||||||||||||||||||||||||||||
| * Combines template style, artist context, song lyrics, and audience data. | ||||||||||||||||||||||||||||||||||||||
| * | ||||||||||||||||||||||||||||||||||||||
| * Matches the content-creation-app's generateCaption.ts behavior. | ||||||||||||||||||||||||||||||||||||||
| * | ||||||||||||||||||||||||||||||||||||||
| * @param root0 | ||||||||||||||||||||||||||||||||||||||
| * @param root0.template | ||||||||||||||||||||||||||||||||||||||
| * @param root0.songTitle | ||||||||||||||||||||||||||||||||||||||
| * @param root0.fullLyrics | ||||||||||||||||||||||||||||||||||||||
| * @param root0.clipLyrics | ||||||||||||||||||||||||||||||||||||||
| * @param root0.artistContext | ||||||||||||||||||||||||||||||||||||||
| * @param root0.audienceContext | ||||||||||||||||||||||||||||||||||||||
| * @param root0.captionLength | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+19
to
+27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Auto-generated JSDoc parameter names are not meaningful. The 📝 Suggested improvement * Matches the content-creation-app's generateCaption.ts behavior.
*
- * `@param` root0
- * `@param` root0.template
- * `@param` root0.songTitle
- * `@param` root0.fullLyrics
- * `@param` root0.clipLyrics
- * `@param` root0.artistContext
- * `@param` root0.audienceContext
- * `@param` root0.captionLength
+ * `@param` options - Caption generation options
+ * `@param` options.template - Template data with style/caption guides
+ * `@param` options.songTitle - Title of the song
+ * `@param` options.fullLyrics - Complete song lyrics
+ * `@param` options.clipLyrics - Lyrics for the selected clip window
+ * `@param` options.artistContext - Context about the artist
+ * `@param` options.audienceContext - Context about the target audience
+ * `@param` options.captionLength - Desired caption length (short/medium/long)
*/📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||||||
| export async function generateCaption({ | ||||||||||||||||||||||||||||||||||||||
| template, | ||||||||||||||||||||||||||||||||||||||
|
|
@@ -41,9 +52,10 @@ export async function generateCaption({ | |||||||||||||||||||||||||||||||||||||
| ? JSON.stringify(template.captionGuide, null, 2) | ||||||||||||||||||||||||||||||||||||||
| : "(no caption guide)"; | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| const examples = template.captionExamples.length > 0 | ||||||||||||||||||||||||||||||||||||||
| ? template.captionExamples.map(c => `- "${c}"`).join("\n") | ||||||||||||||||||||||||||||||||||||||
| : "(no examples)"; | ||||||||||||||||||||||||||||||||||||||
| const examples = | ||||||||||||||||||||||||||||||||||||||
| template.captionExamples.length > 0 | ||||||||||||||||||||||||||||||||||||||
| ? template.captionExamples.map(c => `- "${c}"`).join("\n") | ||||||||||||||||||||||||||||||||||||||
| : "(no examples)"; | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| const lengthInstruction = CAPTION_LENGTH_INSTRUCTIONS[captionLength]; | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
|
|
@@ -117,4 +129,3 @@ Generate ONE caption. ${lengthInstruction} Return ONLY the caption text, nothing | |||||||||||||||||||||||||||||||||||||
| logger.log("Caption generated", { caption: captionText.slice(0, 80) }); | ||||||||||||||||||||||||||||||||||||||
| return captionText; | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,9 +13,12 @@ import { DEFAULT_PIPELINE_CONFIG } from "./defaultPipelineConfig"; | |
| * The prompt tells the model to replace the person in the reference scene | ||
| * with the person from the face-guide headshot. | ||
| * | ||
| * @param faceGuideUrl.faceGuideUrl | ||
| * @param faceGuideUrl - fal storage URL of the artist's face-guide (headshot) | ||
| * @param referenceImagePath - local path to a template reference image (or null) | ||
| * @param prompt - Scene/style prompt that instructs the face swap | ||
| * @param faceGuideUrl.referenceImagePath | ||
| * @param faceGuideUrl.prompt | ||
|
Comment on lines
+16
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Malformed JSDoc Same pattern as other files — 🤖 Prompt for AI Agents |
||
| * @returns URL of the generated image | ||
| */ | ||
| export async function generateContentImage({ | ||
|
|
@@ -75,7 +78,11 @@ export async function generateContentImage({ | |
| return imageUrl; | ||
| } | ||
|
|
||
| /** Extracts a media URL from various fal.ai response shapes. */ | ||
| /** | ||
| * Extracts a media URL from various fal.ai response shapes. | ||
| * | ||
| * @param data | ||
| */ | ||
| function extractFalUrl(data: Record<string, unknown>): string | undefined { | ||
| for (const key of ["image", "video"]) { | ||
| if (data[key] && typeof data[key] === "object") { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,8 +5,10 @@ import { DEFAULT_PIPELINE_CONFIG } from "./defaultPipelineConfig"; | |
| /** | ||
| * Generates a video from an AI-generated image using fal.ai image-to-video. | ||
| * | ||
| * @param imageUrl.imageUrl | ||
| * @param imageUrl - URL of the source image (from generateContentImage) | ||
| * @param motionPrompt - Describes how the subject should move | ||
| * @param imageUrl.motionPrompt | ||
|
Comment on lines
+8
to
+11
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Malformed JSDoc Same issue as in 🤖 Prompt for AI Agents |
||
| * @returns URL of the generated video | ||
| */ | ||
| export async function generateContentVideo({ | ||
|
|
@@ -17,10 +19,7 @@ export async function generateContentVideo({ | |
| motionPrompt: string; | ||
| }): Promise<string> { | ||
| const config = DEFAULT_PIPELINE_CONFIG; | ||
| const durationSeconds = Math.min( | ||
| config.clipDuration, | ||
| config.videoModelMaxSeconds, | ||
| ); | ||
| const durationSeconds = Math.min(config.clipDuration, config.videoModelMaxSeconds); | ||
|
|
||
| logger.log("Generating video", { | ||
| model: config.videoModel, | ||
|
|
@@ -55,6 +54,8 @@ export async function generateContentVideo({ | |
|
|
||
| /** | ||
| * Extracts a media URL from various fal.ai response shapes. | ||
| * | ||
| * @param data | ||
| */ | ||
| function extractFalUrl(data: Record<string, unknown>): string | undefined { | ||
| for (const key of ["image", "video"]) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Malformed JSDoc
@paramannotations.The JSDoc parameter annotations are incorrectly formatted. They reference
imageUrl.imageUrl,imageUrl.songBuffer, etc., but the function uses destructured parameters at the top level (imageUrl,songBuffer,audioStartSeconds, etc.). This appears to be auto-generated documentation that didn't correctly parse the parameter structure.📝 Proposed fix for JSDoc
🤖 Prompt for AI Agents