Reubencf commited on
Commit
36dbece
·
1 Parent(s): 88f42aa

Added elevnlabs fixing build issues

Browse files
Files changed (2) hide show
  1. app/components/VoiceApp.tsx +5 -5
  2. mcp-server.js +8 -8
app/components/VoiceApp.tsx CHANGED
@@ -52,20 +52,20 @@ export function VoiceApp({ onClose, onMinimize, onMaximize, onFocus, zIndex }: V
52
 
53
  const loadContent = async () => {
54
  try {
55
- // Try to get passkey from sessionStorage (set by Claude integration)
56
- const passkey = sessionStorage.getItem('userPasskey') || 'demo'
57
 
58
  // Load from server
59
  const response = await fetch(`/api/voice/save?passkey=${passkey}`)
60
  if (response.ok) {
61
  const data = await response.json()
62
- if (data.success && data.content.length > 0) {
63
- setVoiceContents(data.content)
64
  return
65
  }
66
  }
67
 
68
- // Fallback to localStorage
69
  const saved = localStorage.getItem('voice-app-contents')
70
  if (saved) {
71
  const parsed = JSON.parse(saved)
 
52
 
53
  const loadContent = async () => {
54
  try {
55
+ // Use default 'demo' passkey for all users
56
+ const passkey = 'demo'
57
 
58
  // Load from server
59
  const response = await fetch(`/api/voice/save?passkey=${passkey}`)
60
  if (response.ok) {
61
  const data = await response.json()
62
+ if (data.success) {
63
+ setVoiceContents(data.content || [])
64
  return
65
  }
66
  }
67
 
68
+ // Fallback to localStorage if server fails
69
  const saved = localStorage.getItem('voice-app-contents')
70
  if (saved) {
71
  const parsed = JSON.parse(saved)
mcp-server.js CHANGED
@@ -198,7 +198,7 @@ class ReubenOSMCPServer {
198
  description: 'Your passkey for authentication',
199
  },
200
  },
201
- required: ['title', 'style', 'lyrics', 'passkey'],
202
  },
203
  },
204
  {
@@ -220,7 +220,7 @@ class ReubenOSMCPServer {
220
  description: 'Your passkey for authentication',
221
  },
222
  },
223
- required: ['title', 'content', 'passkey'],
224
  },
225
  },
226
  ],
@@ -575,11 +575,11 @@ class ReubenOSMCPServer {
575
 
576
  async generateSongAudio(args) {
577
  try {
578
- const { title, style, lyrics, passkey } = args;
579
 
580
- if (!title || !style || !lyrics || !passkey) {
581
  return {
582
- content: [{ type: 'text', text: '❌ title, style, lyrics, and passkey are required' }],
583
  };
584
  }
585
 
@@ -624,11 +624,11 @@ class ReubenOSMCPServer {
624
 
625
  async generateStoryAudio(args) {
626
  try {
627
- const { title, content, passkey } = args;
628
 
629
- if (!title || !content || !passkey) {
630
  return {
631
- content: [{ type: 'text', text: '❌ title, content, and passkey are required' }],
632
  };
633
  }
634
 
 
198
  description: 'Your passkey for authentication',
199
  },
200
  },
201
+ required: ['title', 'style', 'lyrics'],
202
  },
203
  },
204
  {
 
220
  description: 'Your passkey for authentication',
221
  },
222
  },
223
+ required: ['title', 'content'],
224
  },
225
  },
226
  ],
 
575
 
576
  async generateSongAudio(args) {
577
  try {
578
+ const { title, style, lyrics, passkey = 'demo' } = args;
579
 
580
+ if (!title || !style || !lyrics) {
581
  return {
582
+ content: [{ type: 'text', text: '❌ title, style, and lyrics are required' }],
583
  };
584
  }
585
 
 
624
 
625
  async generateStoryAudio(args) {
626
  try {
627
+ const { title, content, passkey = 'demo' } = args;
628
 
629
+ if (!title || !content) {
630
  return {
631
+ content: [{ type: 'text', text: '❌ title and content are required' }],
632
  };
633
  }
634