vibefast-cli 0.2.2 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/.wrangler/state/v3/r2/miniflare-R2BucketObject/d1cc388a1a0ef44dd5669fd1a165d168b61362136c8b5fa50aefd96c72688e54.sqlite +0 -0
  2. package/.wrangler/state/v3/r2/miniflare-R2BucketObject/d1cc388a1a0ef44dd5669fd1a165d168b61362136c8b5fa50aefd96c72688e54.sqlite-shm +0 -0
  3. package/.wrangler/state/v3/r2/miniflare-R2BucketObject/d1cc388a1a0ef44dd5669fd1a165d168b61362136c8b5fa50aefd96c72688e54.sqlite-wal +0 -0
  4. package/.wrangler/state/v3/r2/vibefast-recipes/blobs/177b5d7279681c1bec396cafe63779a2d89eaf538109e55733147727276e2b9f0000019a81f04ba2 +0 -0
  5. package/.wrangler/state/v3/r2/vibefast-recipes/blobs/4fe398bba6e2d5f13b569bc1be4244e696d86caa04c323db2d9fb0b9381c508f0000019a81f0503f +0 -0
  6. package/.wrangler/state/v3/r2/vibefast-recipes/blobs/f68f19a655380ac7fb575eb49c0623cde74046261ed89c498ba5107b8aacde9d0000019a81f05484 +0 -0
  7. package/DOCS-CLEANUP-SUMMARY.md +140 -0
  8. package/DOCS.md +141 -0
  9. package/IMPLEMENTATION-COMPLETE.md +6 -5
  10. package/MANUAL-STEPS-GUIDE.md +385 -0
  11. package/MANUAL-STEPS-USER-FLOW.md +231 -0
  12. package/PLAN-VS-IMPLEMENTATION.md +248 -0
  13. package/PUBLISHED-0.2.2.md +65 -0
  14. package/README.md +24 -2
  15. package/START-HERE.md +115 -0
  16. package/docs/next-steps.md +12 -0
  17. package/package.json +10 -1
  18. package/recipes/audio-recorder@latest.zip +0 -0
  19. package/recipes/charts/apps/native/src/app/charts/index.tsx +3 -0
  20. package/recipes/charts/apps/native/src/features/charts/app/preview.tsx +3 -0
  21. package/recipes/charts/apps/native/src/features/charts/components/area-chart.tsx +3 -0
  22. package/recipes/charts/apps/native/src/features/charts/components/bar-chart.tsx +3 -0
  23. package/recipes/charts/apps/native/src/features/charts/components/candlestick-chart.tsx +3 -0
  24. package/recipes/charts/apps/native/src/features/charts/components/chart-card.tsx +3 -0
  25. package/recipes/charts/apps/native/src/features/charts/components/column-chart.tsx +3 -0
  26. package/recipes/charts/apps/native/src/features/charts/components/doughnut-chart.tsx +3 -0
  27. package/recipes/charts/apps/native/src/features/charts/components/index.ts +3 -0
  28. package/recipes/charts/apps/native/src/features/charts/components/line-chart.tsx +3 -0
  29. package/recipes/charts/apps/native/src/features/charts/components/radar-chart.tsx +3 -0
  30. package/recipes/charts/apps/native/src/features/charts/components/radial-bar-chart.tsx +3 -0
  31. package/recipes/charts/apps/native/src/features/charts/components/stacked-area-chart.tsx +3 -0
  32. package/recipes/charts/apps/native/src/features/charts/components/stacked-bar-chart.tsx +3 -0
  33. package/recipes/charts/apps/native/src/features/charts/data/mock-data.ts +3 -0
  34. package/recipes/charts/apps/native/src/features/charts/types/index.ts +3 -0
  35. package/recipes/charts/recipe.json +7 -1
  36. package/recipes/charts@latest.zip +0 -0
  37. package/recipes/chatbot/apps/native/src/app/chatbot/index.tsx +1 -0
  38. package/recipes/chatbot/apps/native/src/features/chatbot/app/index.tsx +1 -0
  39. package/recipes/chatbot/apps/native/src/features/chatbot/components/chat-header-buttons.tsx +1 -0
  40. package/recipes/chatbot/apps/native/src/features/chatbot/components/chat-input-bar.tsx +1 -0
  41. package/recipes/chatbot/apps/native/src/features/chatbot/components/chat-markdown.tsx +1 -0
  42. package/recipes/chatbot/apps/native/src/features/chatbot/components/chat-message-bubble.tsx +1 -0
  43. package/recipes/chatbot/apps/native/src/features/chatbot/components/chat-settings-modal.tsx +1 -0
  44. package/recipes/chatbot/apps/native/src/features/chatbot/components/image-preview-list.tsx +1 -0
  45. package/recipes/chatbot/apps/native/src/features/chatbot/components/markdown/code-block.tsx +1 -0
  46. package/recipes/chatbot/apps/native/src/features/chatbot/components/markdown/index.ts +1 -0
  47. package/recipes/chatbot/apps/native/src/features/chatbot/components/markdown/table-renderer.tsx +1 -0
  48. package/recipes/chatbot/apps/native/src/features/chatbot/components/message-error-boundary.tsx +1 -0
  49. package/recipes/chatbot/apps/native/src/features/chatbot/components/message-list.tsx +1 -0
  50. package/recipes/chatbot/apps/native/src/features/chatbot/components/model-selector.tsx +1 -0
  51. package/recipes/chatbot/apps/native/src/features/chatbot/components/report-content-modal.tsx +1 -0
  52. package/recipes/chatbot/apps/native/src/features/chatbot/components/suggested-messages.tsx +1 -0
  53. package/recipes/chatbot/apps/native/src/features/chatbot/constants/models.ts +1 -0
  54. package/recipes/chatbot/apps/native/src/features/chatbot/constants/report-reasons.ts +1 -0
  55. package/recipes/chatbot/apps/native/src/features/chatbot/hooks/use-attachment-cache.ts +1 -0
  56. package/recipes/chatbot/apps/native/src/features/chatbot/hooks/use-chat-config.ts +1 -0
  57. package/recipes/chatbot/apps/native/src/features/chatbot/hooks/use-chat-handlers.ts +1 -0
  58. package/recipes/chatbot/apps/native/src/features/chatbot/hooks/use-chatbot-settings.ts +1 -0
  59. package/recipes/chatbot/apps/native/src/features/chatbot/hooks/use-conversation.ts +1 -0
  60. package/recipes/chatbot/apps/native/src/features/chatbot/hooks/use-image-picker.ts +1 -0
  61. package/recipes/chatbot/apps/native/src/features/chatbot/hooks/use-keyboard-coordinator.ts +1 -0
  62. package/recipes/chatbot/apps/native/src/features/chatbot/hooks/use-smart-scroll-manager.ts +1 -0
  63. package/recipes/chatbot/apps/native/src/features/chatbot/models/index.ts +1 -0
  64. package/recipes/chatbot/apps/native/src/features/chatbot/models/models.ts +1 -0
  65. package/recipes/chatbot/apps/native/src/features/chatbot/models/providers.ts +1 -0
  66. package/recipes/chatbot/apps/native/src/features/chatbot/models/types.ts +1 -0
  67. package/recipes/chatbot/apps/native/src/features/chatbot/services/file-uploader.ts +1 -0
  68. package/recipes/chatbot/apps/native/src/features/chatbot/services/message-handler-service.ts +1 -0
  69. package/recipes/chatbot/apps/native/src/features/chatbot/types/index.ts +1 -0
  70. package/recipes/chatbot/apps/native/src/features/chatbot/utils/chat-telemetry.ts +1 -0
  71. package/recipes/chatbot/packages/backend/convex/agents.ts +116 -0
  72. package/recipes/chatbot/packages/backend/convex/chatbot/index.ts +30 -0
  73. package/recipes/chatbot/packages/backend/convex/chatbotAgent.ts +1085 -0
  74. package/recipes/chatbot/packages/backend/convex/chatbotHistory.ts +307 -0
  75. package/recipes/chatbot/packages/backend/convex/lib/rateLimit.ts +100 -0
  76. package/recipes/chatbot/packages/backend/convex/lib/telemetry.ts +29 -0
  77. package/recipes/chatbot/packages/backend/convex/ragKnowledge.ts +714 -0
  78. package/recipes/chatbot/packages/backend/convex/tools/index.ts +18 -0
  79. package/recipes/chatbot/packages/backend/convex/tools/knowledgeRetrieval.ts +92 -0
  80. package/recipes/chatbot/packages/backend/convex/tools/tavilySearch.ts +83 -0
  81. package/recipes/chatbot/packages/backend/convex/tools/userProfile.ts +72 -0
  82. package/recipes/chatbot/recipe.json +104 -1
  83. package/recipes/chatbot@latest.zip +0 -0
  84. package/recipes/image-generator/packages/backend/convex/imageGeneration/index.ts +12 -0
  85. package/recipes/image-generator/packages/backend/convex/imageGeneratorFunctions.ts +290 -0
  86. package/recipes/image-generator/recipe.json +41 -1
  87. package/recipes/image-generator@latest.zip +0 -0
  88. package/recipes/quiz@latest.zip +0 -0
  89. package/recipes/tracker-app@latest.zip +0 -0
  90. package/recipes/voice-bot/packages/backend/convex/router.ts +81 -0
  91. package/recipes/voice-bot/recipe.json +48 -1
  92. package/recipes/voice-bot@latest.zip +0 -0
  93. package/scripts/create-recipes.mjs +33 -1
  94. package/MONITORING-AND-ANNOUNCEMENT-GUIDE.md +0 -669
  95. package/PRE-PUBLISH-CHECKLIST.md +0 -558
  96. package/PUBLISHED-SUCCESS.md +0 -282
  97. package/READY-TO-PUBLISH.md +0 -419
  98. package/RECIPES-READY.md +0 -172
  99. package/cloudflare-worker/mini-native@latest.zip +0 -0
  100. package/cloudflare-worker/test-recipe/apps/native/src/app/mini/index.tsx +0 -15
  101. package/cloudflare-worker/test-recipe/recipe.json +0 -16
  102. package/text.md +0 -27
  103. /package/{AUTO-DETECT-DEPS.md → docs/archive/AUTO-DETECT-DEPS.md} +0 -0
  104. /package/{FINAL-PACKAGE-STRATEGY.md → docs/archive/FINAL-PACKAGE-STRATEGY.md} +0 -0
  105. /package/{FINAL-SIMPLE-PLAN.md → docs/archive/FINAL-SIMPLE-PLAN.md} +0 -0
  106. /package/{FINAL-STATUS.md → docs/archive/FINAL-STATUS.md} +0 -0
  107. /package/{FLOW-DIAGRAM.md → docs/archive/FLOW-DIAGRAM.md} +0 -0
  108. /package/{GOTCHAS-AND-RISKS.md → docs/archive/GOTCHAS-AND-RISKS.md} +0 -0
  109. /package/{IMPLEMENTATION-PLAN.md → docs/archive/IMPLEMENTATION-PLAN.md} +0 -0
  110. /package/{PLAN.md → docs/archive/PLAN.md} +0 -0
  111. /package/{PRODUCTION-READINESS.md → docs/archive/PRODUCTION-READINESS.md} +0 -0
  112. /package/{PRODUCTION-TEST-RESULTS.md → docs/archive/PRODUCTION-TEST-RESULTS.md} +0 -0
  113. /package/{SIMPLIFIED-PLAN.md → docs/archive/SIMPLIFIED-PLAN.md} +0 -0
  114. /package/{STATUS.md → docs/archive/STATUS.md} +0 -0
  115. /package/{SUCCESS.md → docs/archive/SUCCESS.md} +0 -0
  116. /package/{TEST-SUMMARY.md → docs/archive/TEST-SUMMARY.md} +0 -0
  117. /package/{TESTING-CHECKLIST.md → docs/archive/TESTING-CHECKLIST.md} +0 -0
  118. /package/{USER-MODIFICATIONS.md → docs/archive/USER-MODIFICATIONS.md} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibefast-cli",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "CLI for installing VibeFast features into your monorepo",
5
5
  "type": "module",
6
6
  "bin": {
@@ -21,6 +21,15 @@
21
21
  ],
22
22
  "author": "VibeFast",
23
23
  "license": "MIT",
24
+ "homepage": "https://github.com/vibefast/vibefast-cli#readme",
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "https://github.com/vibefast/vibefast-cli.git"
28
+ },
29
+ "bugs": {
30
+ "url": "https://github.com/vibefast/vibefast-cli/issues",
31
+ "email": "support@vibefast.pro"
32
+ },
24
33
  "dependencies": {
25
34
  "commander": "^12.0.0",
26
35
  "picocolors": "^1.0.0",
Binary file
@@ -1,3 +1,6 @@
1
+ // vibefast license: c1e9fcd2-muhammad
2
+ // vibefast license: c1e9fcd2-muhammad
3
+ // vibefast license: c1e9fcd2-muhammad
1
4
  import ChartPreviewScreen from '@/features/charts/app/preview';
2
5
 
3
6
  export default ChartPreviewScreen;
@@ -1,3 +1,6 @@
1
+ // vibefast license: c1e9fcd2-muhammad
2
+ // vibefast license: c1e9fcd2-muhammad
3
+ // vibefast license: c1e9fcd2-muhammad
1
4
  import type React from 'react';
2
5
  import { FlatList } from 'react-native';
3
6
 
@@ -1,3 +1,6 @@
1
+ // vibefast license: c1e9fcd2-muhammad
2
+ // vibefast license: c1e9fcd2-muhammad
3
+ // vibefast license: c1e9fcd2-muhammad
1
4
  import type { ViewStyle } from 'react-native';
2
5
 
3
6
  import { LineChart } from './line-chart';
@@ -1,3 +1,6 @@
1
+ // vibefast license: c1e9fcd2-muhammad
2
+ // vibefast license: c1e9fcd2-muhammad
3
+ // vibefast license: c1e9fcd2-muhammad
1
4
  import { Canvas, Group, RoundedRect } from '@shopify/react-native-skia';
2
5
  import React, { useEffect, useState } from 'react';
3
6
  import { type LayoutChangeEvent, View, type ViewStyle } from 'react-native';
@@ -1,3 +1,6 @@
1
+ // vibefast license: c1e9fcd2-muhammad
2
+ // vibefast license: c1e9fcd2-muhammad
3
+ // vibefast license: c1e9fcd2-muhammad
1
4
  import {
2
5
  Canvas,
3
6
  Group,
@@ -1,3 +1,6 @@
1
+ // vibefast license: c1e9fcd2-muhammad
2
+ // vibefast license: c1e9fcd2-muhammad
3
+ // vibefast license: c1e9fcd2-muhammad
1
4
  import type React from 'react';
2
5
  import { Dimensions, View } from 'react-native';
3
6
 
@@ -1,3 +1,6 @@
1
+ // vibefast license: c1e9fcd2-muhammad
2
+ // vibefast license: c1e9fcd2-muhammad
3
+ // vibefast license: c1e9fcd2-muhammad
1
4
  import { Canvas, Group, RoundedRect } from '@shopify/react-native-skia';
2
5
  import React, { useEffect, useState } from 'react';
3
6
  import { type LayoutChangeEvent, View, type ViewStyle } from 'react-native';
@@ -1,3 +1,6 @@
1
+ // vibefast license: c1e9fcd2-muhammad
2
+ // vibefast license: c1e9fcd2-muhammad
3
+ // vibefast license: c1e9fcd2-muhammad
1
4
  import {
2
5
  Canvas,
3
6
  Group,
@@ -1,3 +1,6 @@
1
+ // vibefast license: c1e9fcd2-muhammad
2
+ // vibefast license: c1e9fcd2-muhammad
3
+ // vibefast license: c1e9fcd2-muhammad
1
4
  export { AreaChart } from './area-chart';
2
5
  export { BarChart } from './bar-chart';
3
6
  export { CandlestickChart } from './candlestick-chart';
@@ -1,3 +1,6 @@
1
+ // vibefast license: c1e9fcd2-muhammad
2
+ // vibefast license: c1e9fcd2-muhammad
3
+ // vibefast license: c1e9fcd2-muhammad
1
4
  import {
2
5
  Canvas,
3
6
  Circle,
@@ -1,3 +1,6 @@
1
+ // vibefast license: c1e9fcd2-muhammad
2
+ // vibefast license: c1e9fcd2-muhammad
3
+ // vibefast license: c1e9fcd2-muhammad
1
4
  import {
2
5
  Canvas,
3
6
  Circle as SkCircle,
@@ -1,3 +1,6 @@
1
+ // vibefast license: c1e9fcd2-muhammad
2
+ // vibefast license: c1e9fcd2-muhammad
3
+ // vibefast license: c1e9fcd2-muhammad
1
4
  import {
2
5
  Canvas,
3
6
  Group,
@@ -1,3 +1,6 @@
1
+ // vibefast license: c1e9fcd2-muhammad
2
+ // vibefast license: c1e9fcd2-muhammad
3
+ // vibefast license: c1e9fcd2-muhammad
1
4
  import {
2
5
  Canvas,
3
6
  Group,
@@ -1,3 +1,6 @@
1
+ // vibefast license: c1e9fcd2-muhammad
2
+ // vibefast license: c1e9fcd2-muhammad
3
+ // vibefast license: c1e9fcd2-muhammad
1
4
  import { Canvas, Group, RoundedRect } from '@shopify/react-native-skia';
2
5
  import React, { useEffect, useState } from 'react';
3
6
  import { type LayoutChangeEvent, View, type ViewStyle } from 'react-native';
@@ -1,3 +1,6 @@
1
+ // vibefast license: c1e9fcd2-muhammad
2
+ // vibefast license: c1e9fcd2-muhammad
3
+ // vibefast license: c1e9fcd2-muhammad
1
4
  export const salesData = [
2
5
  { id: '1', label: 'Jan', value: 3500, color: '#3B82F6' },
3
6
  { id: '2', label: 'Feb', value: 4200, color: '#10B981' },
@@ -1,3 +1,6 @@
1
+ // vibefast license: c1e9fcd2-muhammad
2
+ // vibefast license: c1e9fcd2-muhammad
3
+ // vibefast license: c1e9fcd2-muhammad
1
4
  export type ChartData = {
2
5
  value: number;
3
6
  label: string;
@@ -18,5 +18,11 @@
18
18
  "icon": "📊",
19
19
  "color": "#6366F1"
20
20
  },
21
- "target": "native"
21
+ "target": "native",
22
+ "dependencies": {
23
+ "expo": [
24
+ "@shopify/react-native-skia",
25
+ "react-native-svg"
26
+ ]
27
+ }
22
28
  }
Binary file
@@ -1 +1,2 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  export { default } from '@/features/chatbot/app';
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  import { useAuthToken } from '@convex-dev/auth/react';
2
3
  import { api } from '@vibefast/backend/_generated/api';
3
4
  import type { Id } from '@vibefast/backend/_generated/dataModel';
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  import type React from 'react';
2
3
  import { View } from 'react-native';
3
4
 
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  import { AntDesign, Feather } from '@expo/vector-icons';
2
3
  import type React from 'react';
3
4
  import { useCallback, useMemo, useRef, useState } from 'react';
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  /**
2
3
  * ChatMarkdown component for rendering markdown content in chat messages.
3
4
  *
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  import { Feather, Ionicons } from '@expo/vector-icons';
2
3
  import type { Id } from '@vibefast/backend/_generated/dataModel';
3
4
  import type { Message } from 'ai'; // Base Message type
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  import React from 'react';
2
3
  import { View } from 'react-native';
3
4
 
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  import { Feather } from '@expo/vector-icons';
2
3
  import type React from 'react';
3
4
  import { ActivityIndicator, ScrollView, View } from 'react-native';
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  import { Feather } from '@expo/vector-icons';
2
3
  import React, { useCallback, useState } from 'react';
3
4
  import {
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  /**
2
3
  * Markdown rendering components for chatbot messages.
3
4
  *
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  import React from 'react';
2
3
  import { ScrollView, View, type ViewStyle } from 'react-native';
3
4
 
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  import React from 'react';
2
3
  import { View } from 'react-native';
3
4
 
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  import type { FlashListRef } from '@shopify/flash-list';
2
3
  import { FlashList } from '@shopify/flash-list';
3
4
  import type { Message } from 'ai';
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  import { Feather } from '@expo/vector-icons';
2
3
  import type React from 'react';
3
4
  import { Alert, ScrollView, View } from 'react-native';
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  import React, { useState } from 'react';
2
3
  import { View } from 'react-native';
3
4
 
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  import type React from 'react';
2
3
  import { useCallback } from 'react';
3
4
  import { ScrollView, View } from 'react-native';
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  // DEPRECATED: This file has been moved to src/features/chatbot/models/
2
3
  // Please import from '@/features/chatbot/models' instead
3
4
  // This file is kept for backward compatibility
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  export const REPORT_REASONS = [
2
3
  { label: 'Inaccurate Information', value: 'inaccurate' },
3
4
  { label: 'Offensive Content', value: 'offensive' },
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  import type { Id } from '@vibefast/backend/_generated/dataModel';
2
3
  import { useCallback, useEffect, useRef } from 'react';
3
4
 
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  import type { Id } from '@vibefast/backend/_generated/dataModel';
2
3
  import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
3
4
 
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  import type { Id } from '@vibefast/backend/_generated/dataModel';
2
3
  import React, { useCallback, useMemo, useState } from 'react';
3
4
  import { Alert, Keyboard } from 'react-native';
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  import { useCallback, useEffect, useState } from 'react';
2
3
 
3
4
  import { defaultCacheService } from '@/core/cache';
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  import type { Id } from '@vibefast/backend/_generated/dataModel';
2
3
  import { useEffect, useMemo, useState } from 'react';
3
4
 
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  import * as ImagePicker from 'expo-image-picker';
2
3
  import { useCallback } from 'react';
3
4
  import { Alert } from 'react-native';
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  import { useCallback, useEffect, useRef } from 'react';
2
3
  import { Keyboard } from 'react-native';
3
4
  import {
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  import type { FlashListRef } from '@shopify/flash-list';
2
3
  import { useCallback, useEffect, useMemo, useRef } from 'react';
3
4
  import type { NativeScrollEvent, NativeSyntheticEvent } from 'react-native';
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  // Import directly to avoid circular dependencies
2
3
  import { DEFAULT_MODELS, MODELS } from './models';
3
4
  import type { ModelConfig, ModelId, Provider } from './types';
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  import type { ModelConfig, Provider } from './types';
2
3
 
3
4
  export const MODELS: ModelConfig[] = [
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  import type React from 'react';
2
3
 
3
4
  import { ClaudeIcon } from '@/components/ui/icons/claude';
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  export type Provider = 'claude' | 'openai' | 'gemini';
2
3
 
3
4
  export type ModelCategory = 'free' | 'premium' | 'specialized';
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  import { manipulateAsync, SaveFormat } from 'expo-image-manipulator';
2
3
  import { Image } from 'react-native';
3
4
 
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  import type { Id } from '@vibefast/backend/_generated/dataModel';
2
3
  import { Alert } from 'react-native';
3
4
 
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  import type { Id } from '@vibefast/backend/_generated/dataModel';
2
3
  import type { Message } from 'ai';
3
4
 
@@ -1,3 +1,4 @@
1
+ // vibefast license: c1e9fcd2-muhammad
1
2
  import type { TelemetryMode } from '@/core/config';
2
3
  import { getChatTelemetryMode } from '@/core/config/telemetry';
3
4
 
@@ -0,0 +1,116 @@
1
+ import { createGoogleGenerativeAI } from '@ai-sdk/google';
2
+ import { openai } from '@ai-sdk/openai';
3
+ import type { LanguageModelV1 } from '@ai-sdk/provider';
4
+ import { Agent } from '@convex-dev/agent';
5
+
6
+ import { components } from './_generated/api';
7
+ import {
8
+ knowledgeRetrievalTool,
9
+ tavilySearchTool,
10
+ userProfileTool,
11
+ } from './tools';
12
+
13
+ const google = createGoogleGenerativeAI();
14
+
15
+ type ModelProvider = 'openai' | 'google';
16
+
17
+ type ModelResolver = () => {
18
+ model: LanguageModelV1;
19
+ provider: ModelProvider;
20
+ modelId: string;
21
+ };
22
+
23
+ const PROVIDER_CHAT_FACTORIES: Record<
24
+ ModelProvider,
25
+ (modelId: string) => LanguageModelV1
26
+ > = {
27
+ openai: (modelId) => openai.chat(modelId),
28
+ google: (modelId) => google.chat(modelId),
29
+ };
30
+
31
+ const MODEL_CONFIGS = {
32
+ 'gpt-4.1-nano': { provider: 'openai', modelId: 'gpt-4.1-nano' },
33
+ 'gpt-5': { provider: 'openai', modelId: 'gpt-5' },
34
+ 'gpt-5-nano': { provider: 'openai', modelId: 'gpt-5-nano' },
35
+ 'gpt-4o-mini': { provider: 'openai', modelId: 'gpt-4o-mini' },
36
+ 'gpt-4o': { provider: 'openai', modelId: 'gpt-4o' },
37
+ 'gemini-2.0-flash': {
38
+ provider: 'google',
39
+ modelId: 'models/gemini-2.0-flash',
40
+ },
41
+ 'gemini-1.5-flash': {
42
+ provider: 'google',
43
+ modelId: 'models/gemini-1.5-flash',
44
+ },
45
+ 'gemini-1.5-pro': { provider: 'google', modelId: 'models/gemini-1.5-pro' },
46
+ 'gemini-2.5-flash': {
47
+ provider: 'google',
48
+ modelId: 'models/gemini-2.5-flash-preview-05-20',
49
+ },
50
+ 'gemini-2.5-pro': {
51
+ provider: 'google',
52
+ modelId: 'models/gemini-2.5-pro-preview-06-05',
53
+ },
54
+ } satisfies Record<string, { provider: ModelProvider; modelId: string }>;
55
+
56
+ const MODEL_RESOLVERS = Object.fromEntries(
57
+ Object.entries(MODEL_CONFIGS).map(([key, config]) => [
58
+ key,
59
+ () => ({
60
+ model: PROVIDER_CHAT_FACTORIES[config.provider](config.modelId),
61
+ provider: config.provider,
62
+ modelId: config.modelId,
63
+ }),
64
+ ]),
65
+ ) as Record<string, ModelResolver>;
66
+
67
+ const DEFAULT_MODEL: keyof typeof MODEL_CONFIGS = 'gpt-4.1-nano';
68
+
69
+ export function resolveChatModel(preferredModel?: string) {
70
+ const modelKey =
71
+ preferredModel && MODEL_RESOLVERS[preferredModel]
72
+ ? preferredModel
73
+ : DEFAULT_MODEL;
74
+
75
+ const resolver = MODEL_RESOLVERS[modelKey] ?? MODEL_RESOLVERS[DEFAULT_MODEL];
76
+
77
+ try {
78
+ return resolver();
79
+ } catch (error) {
80
+ if (modelKey !== DEFAULT_MODEL) {
81
+ return MODEL_RESOLVERS[DEFAULT_MODEL]();
82
+ }
83
+ throw error;
84
+ }
85
+ }
86
+
87
+ export const agent: Agent = new Agent(components.agent, {
88
+ name: 'VibeFast Assistant',
89
+ chat: MODEL_RESOLVERS[DEFAULT_MODEL]().model,
90
+ instructions: `
91
+ You are VibeFast, a proactive mobile AI assistant. Produce concise, friendly responses with clear structure.
92
+
93
+ - Use markdown for readability (lists, bold keywords, inline code where appropriate).
94
+ - When a question depends on current or niche information, call the tavilySearch tool first and cite the findings.
95
+ - When the user asks about their account, credits, or profile details, call the userProfile tool before answering.
96
+ - When the user references uploaded files or knowledge base material, call the knowledgeRetrieval tool with relevant filters to ground your answer.
97
+ - For image attachments, describe what you see before reasoning about it.
98
+ - If a user asks for something you cannot do, gracefully explain the limitation and offer an alternative.
99
+ - Keep responses focused on the user's goal; avoid unnecessary chatter.
100
+ `.trim(),
101
+ tools: {
102
+ knowledgeRetrieval: knowledgeRetrievalTool,
103
+ tavilySearch: tavilySearchTool,
104
+ userProfile: userProfileTool,
105
+ },
106
+ maxSteps: 6,
107
+ contextOptions: {
108
+ recentMessages: 50,
109
+ },
110
+ storageOptions: {
111
+ saveMessages: 'promptAndOutput',
112
+ },
113
+ });
114
+
115
+ export const SUPPORTED_MODEL_KEYS = Object.keys(MODEL_RESOLVERS);
116
+ export { DEFAULT_MODEL };
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Chatbot Domain Aggregator
3
+ *
4
+ * This module serves as the single entry point for all chatbot-related
5
+ * Convex functions. It re-exports functions from the underlying modules
6
+ * to decouple the frontend from the internal file structure.
7
+ *
8
+ * Benefits:
9
+ * - Frontend only imports from this aggregator via the gateway
10
+ * - Backend refactors don't cascade to frontend
11
+ * - Clear domain boundaries
12
+ */
13
+
14
+ // Agent functions (streaming, session management)
15
+ export {
16
+ getAgentSession,
17
+ getAgentStreamBody,
18
+ startAgentStream,
19
+ } from '../chatbotAgent';
20
+
21
+ // History functions (messages, conversations)
22
+ export {
23
+ clearConversationMessages,
24
+ createConversation,
25
+ deleteUserMessage,
26
+ getOrCreateDefaultConversation,
27
+ listMessages,
28
+ storeFinalBotMessage,
29
+ storeMessage,
30
+ } from '../chatbotHistory';