Skip to content

Remove legacy Gemini podcast content-generation hook - #207

Merged
denbec merged 1 commit into
mainfrom
chore/remove-legacy-gemini-content-generation
Jul 17, 2026
Merged

Remove legacy Gemini podcast content-generation hook#207
denbec merged 1 commit into
mainfrom
chore/remove-legacy-gemini-content-generation

Conversation

@claude

@claude claude Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Requested by Dennis Becker · Slack thread

Before / After

Before: editing a podcast's transcript in Directus automatically triggered a Gemini call. The content-generation action hook fired on podcasts.items.update whenever transcript_text was set, read the ai_prompts, rendered the templates, and wrote draft shownotes and social posts into podcast_generated_content (those drafts were never auto-approved).

After: that automatic Gemini generation is removed. Nothing auto-generates when a transcript is edited anymore. Shownotes/social generation is being moved to an agent-driven flow, which is out of scope for this PR.

How

  • Removed the hook and its generator: src/content-generation/index.ts and src/content-generation/generateContent.ts.
  • Dropped the content-generation entry from the bundle manifest (directus:extension.entries in package.json).
  • Removed src/shared/fetchSlackContext.ts, which was imported only by the deleted generator (no other file references it).
  • Shared helpers src/shared/gemini.ts and src/shared/templateRenderer.ts are deliberately kept — the cover/asset generator (asset-generation) still uses them, and GEMINI_API_KEY is still required for that.
  • The content-approval hook is left in place but becomes dormant: nothing writes podcast_generated_content anymore, so it has nothing to act on. It can be removed in a follow-up if desired.

The extension bundle build was verified with npm run build (directus-extension build) after the removal — it completes successfully and no reference to the removed module remains.


Generated by Claude Code

Delete the content-generation Directus action hook that fired on
podcasts.items.update and called Gemini to write draft shownotes and
social posts into podcast_generated_content. Removes the hook and its
generateContent module, drops the manifest entry from the bundle
package.json, and removes the now-unused fetchSlackContext helper (only
imported by the removed generator).

Shared helpers gemini.ts and templateRenderer.ts are kept because the
asset generator still uses them.
@vercel

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
programmierbar-website Ready Ready Preview, Comment Jul 16, 2026 1:09pm

Request Review

@denbec
denbec marked this pull request as ready for review July 17, 2026 06:27
Copilot AI review requested due to automatic review settings July 17, 2026 06:27
@denbec
denbec merged commit bc9f680 into main Jul 17, 2026
3 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes the legacy Directus hook that automatically called Gemini to generate podcast shownotes/social drafts on transcript updates, aligning the CMS bundle with the new agent-driven generation flow (out of scope here).

Changes:

  • Deleted the content-generation hook entrypoint and its Gemini generation implementation.
  • Removed the Slack-context helper that was only used by the deleted generator.
  • Unregistered the content-generation entry from the Directus extension bundle manifest.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
directus-cms/extensions/directus-extension-programmierbar-bundle/src/shared/fetchSlackContext.ts Removed Slack message aggregation helper that was only used by legacy content generation.
directus-cms/extensions/directus-extension-programmierbar-bundle/src/content-generation/index.ts Removed the Directus action hook that triggered Gemini generation on transcript updates.
directus-cms/extensions/directus-extension-programmierbar-bundle/src/content-generation/generateContent.ts Removed the Gemini-based shownotes/social generation implementation and its CMS writes.
directus-cms/extensions/directus-extension-programmierbar-bundle/package.json Removed the content-generation hook from directus:extension.entries so it’s no longer loaded.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@denbec
denbec deleted the chore/remove-legacy-gemini-content-generation branch July 17, 2026 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants