sandbox-web-ide/frontend/package.json
Akhileshrangani4 aa33ad3031 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 20:56:56 -05:00

94 lines
2.8 KiB
JSON

{
"name": "sandbox",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@anthropic-ai/sdk": "^0.32.1",
"@atlaskit/pragmatic-drag-and-drop": "^1.1.7",
"@clerk/nextjs": "^4.29.12",
"@clerk/themes": "^1.7.12",
"@codemirror/lang-javascript": "^6.2.2",
"@hookform/resolvers": "^3.3.4",
"@liveblocks/client": "^1.12.0",
"@liveblocks/node": "^1.12.0",
"@liveblocks/react": "^1.12.0",
"@liveblocks/yjs": "^1.12.0",
"@monaco-editor/react": "^4.6.0",
"@paralleldrive/cuid2": "^2.2.2",
"@radix-ui/react-alert-dialog": "^1.0.5",
"@radix-ui/react-avatar": "^1.1.1",
"@radix-ui/react-context-menu": "^2.1.5",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-dropdown-menu": "^2.0.6",
"@radix-ui/react-hover-card": "^1.1.2",
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-popover": "^1.1.1",
"@radix-ui/react-progress": "^1.1.0",
"@radix-ui/react-select": "^2.0.0",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-switch": "^1.0.3",
"@radix-ui/react-tabs": "^1.1.1",
"@radix-ui/react-tooltip": "^1.1.3",
"@react-three/fiber": "^8.16.6",
"@uiw/codemirror-theme-vscode": "^4.23.5",
"@uiw/react-codemirror": "^4.23.5",
"@vercel/analytics": "^1.2.2",
"@xterm/addon-fit": "^0.10.0",
"@xterm/xterm": "^5.5.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"embla-carousel": "^8.3.0",
"embla-carousel-react": "^8.3.0",
"embla-carousel-wheel-gestures": "^8.0.1",
"framer-motion": "^11.2.3",
"fs": "^0.0.1-security",
"geist": "^1.3.0",
"jszip": "^3.10.1",
"lucide-react": "^0.365.0",
"monaco-themes": "^0.4.4",
"next": "14.1.3",
"next-themes": "^0.3.0",
"openai": "^4.73.1",
"posthog-js": "^1.147.0",
"react": "^18.3.1",
"react-dom": "^18",
"react-hook-form": "^7.51.3",
"react-markdown": "^9.0.1",
"react-resizable-panels": "^2.0.16",
"react-syntax-highlighter": "^15.5.0",
"remark-gfm": "^4.0.0",
"shadcn": "^2.1.6",
"socket.io-client": "^4.7.5",
"sonner": "^1.4.41",
"tailwind-merge": "^2.3.0",
"tailwindcss-animate": "^1.0.7",
"three": "^0.164.1",
"vscode-icons-js": "^11.6.1",
"y-monaco": "^0.1.5",
"y-protocols": "^1.0.6",
"yjs": "^13.6.15",
"zod": "^3.23.8"
},
"devDependencies": {
"@types/estree": "^1.0.6",
"@types/node": "^20",
"@types/react": "^18.3.3",
"@types/react-dom": "^18",
"@types/react-syntax-highlighter": "^15.5.13",
"@types/three": "^0.164.0",
"autoprefixer": "^10.0.1",
"postcss": "^8",
"postcss-import": "^16.1.0",
"postcss-nesting": "^12.1.2",
"tailwindcss": "^3.3.0",
"typescript": "^5"
}
}