Commit Graph

36 Commits

Author SHA1 Message Date
6612692d98 feat: introduce apply button functionality (v0.1)
### Summary
- Added a new "Apply" button to code snippets provided by the AI assistant.
- The button is designed to seamlessly merge the AI-generated snippet into the relevant file in the editor.

### Current Issues
1. **Sticky Accept/Decline Buttons:** These activate for every snippet instead of being limited to the relevant snippet.
2. **Discard Button:** Currently non-functional.
3. **Highlight Inconsistencies:** The green-red code highlights for old and new code are inconsistent.

### To Do
- Implement a toast notification when the "Apply" button is pressed on an irrelevant tab to prevent code application errors.

### Workflow Implemented
1. The "Apply" button is added alongside "Copy" and "Reply" for AI-generated code snippets.
2. Upon clicking "Apply," the code snippet and relevant file content (active file) are sent to a secondary model (GPT-4O).
3. The system prompt for GPT-4O instructs it to merge the snippet with the file content:
   - Ensure the original file functionality remains intact.
   - Integrate the code snippet seamlessly.
4. The output from GPT-4O is injected directly into the code editor.
5. Changes are visually highlighted:
   - Green for new code.
   - Red for removed code.
6. Highlights remain until the user explicitly accepts or discards the changes.
2024-11-30 21:52:17 -05:00
c653d34bc1 Merge branch 'main' into feat/profile-page 2024-11-25 23:10:21 +01:00
34994a8c69 refactor(api): remove AI worker, add ai api route, add usage tiers
- Remove separate AI worker service
- Added generation limits:
  FREE: 1000/month (For the beta version)
  PRO: 500/month
  ENTERPRISE: 1000/month
- Integrate AI functionality into main API routes
- Added monthly generations reset and usage tier upgrade API routes
- Upgrade tier page to be added along with profile page section
2024-11-25 15:47:57 -05:00
105eab9bad feat: complete profile page 2024-11-11 22:02:34 +01:00
9fcc45ea71 Merge branch 'main' of https://github.com/Code-Victor/sandbox 2024-11-11 10:12:06 +01:00
90bfdec58a feat: schema updates
- added additional items to users and sandbox tables
- added a random username generator
2024-11-10 22:25:15 -05:00
2195b27c7e Merge branch 'main' of https://github.com/Code-Victor/sandbox 2024-11-04 21:49:37 +01:00
21e4bfb735 feat: add profile page WIP 2024-11-04 21:49:30 +01:00
39911e9ef2 fix: add jszip to frontend 2024-11-02 05:55:50 -06:00
198b59aa55 feat: add AI chat button to open it 2024-10-27 17:27:36 -04:00
428d2366ff Merge branch 'refs/heads/feature/ai-chat'
# Conflicts:
#	frontend/components/editor/index.tsx
2024-10-20 17:22:16 -06:00
cc4a5307cd feat: ai chat now has its own context
This commit includes refactoring and dividing the AI chat files to ensure better readability.
2024-10-14 22:34:26 -04:00
dd59608d73 feature: add AI chat
features:

1. Real-time message display
2. User input handling
3. AI response generation
4. Markdown rendering for AI responses
5. Syntax highlighting for code blocks
6. Copy to clipboard functionality for messages and code blocks
7. Context handling (setting, displaying, and removing context)
8. Expandable/collapsible context display
9. Ability to ask about specific code snippets
10. Auto-scrolling to the latest message
11. Loading indicator during AI response generation
12. Stop generation functionality
13. Error handling for failed API requests
14. Responsive design (flex layout)
15. Custom styling for user and AI messages
16. Support for various Markdown elements (paragraphs, lists, code blocks)
17. Language detection and display for code blocks
18. Animated text generation effect for AI responses
19. Input field placeholder changes based on context presence
20. Disable input during message generation
21. Send message on Enter key press
22. Expandable/collapsible message context for each message
23. Editable context in expanded view
24. Icons for various actions (send, stop, copy, expand/collapse)
25. Visual feedback for copied text (checkmark icon)
26. Abortable fetch requests for AI responses
27. Custom button components
28. Custom loading dots component
29. Truncated display of long messages with expand/collapse functionality
2024-10-13 22:47:47 -04:00
eabc9fa2f6 feat: update create new project dialog 2024-10-13 23:34:27 +01:00
618c1e81b1 fix: add @radix-ui/react-popover 2024-08-18 07:04:46 -07:00
1c860bd4d9 Add PostHog. 2024-07-14 06:00:03 -04:00
c8a2e3200a minor changes + package updates 2024-05-26 21:41:20 -07:00
fbb98ac3b0 revert to local hosting 2024-05-26 17:28:52 -07:00
218afd4fe0 services logic 2024-05-23 01:35:08 -07:00
14ea89d690 ecs logic 2024-05-17 23:18:15 -07:00
bf0111fe91 project card effect 2024-05-16 10:47:34 -07:00
aa97a6771e working dnd + file moving logic 2024-05-10 00:12:41 -07:00
b0b8a63f2f add disabled project options 2024-05-09 12:03:47 -07:00
32a8413ca1 add analytics 2024-05-09 00:56:30 -07:00
91feeffc5a start multi terminal logic 2024-05-06 23:34:45 -07:00
47ce5db223 add ai generations limit + random bug fixes 2024-05-05 16:51:30 -07:00
09ead6073b ui + shared user improvements 2024-05-05 14:33:09 -07:00
0f1654e3dd start liveblocks integration 2024-05-03 13:53:21 -07:00
894de9990a delete file ui + logic 2024-04-30 01:56:43 -04:00
ec900d3d77 start terminal ui + logic 2024-04-28 20:06:47 -04:00
7b7bd6f430 implement server actions for sandbox data mutation 2024-04-27 21:24:20 -04:00
d941e2c056 add sonner + project creation working 2024-04-27 16:22:35 -04:00
b348f1d519 client ws connection 2024-04-26 22:34:56 -04:00
ffee1b60c7 fix worker + start create modal with logic 2024-04-23 01:53:37 -04:00
11dfc0f637 card ui 2024-04-18 03:06:51 -04:00
a838241ac3 refactor folder 2024-04-16 17:18:51 -04:00