adowu commited on
Commit
fc1dbf1
·
verified ·
1 Parent(s): 5625f24

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +169 -294
app.py CHANGED
@@ -28,27 +28,20 @@ PROJECT_TEMPLATES = {
28
  "app.py": """from flask import Flask
29
  from flask_sqlalchemy import SQLAlchemy
30
  import os
31
-
32
  basedir = os.path.abspath(os.path.dirname(__file__))
33
-
34
  app = Flask(__name__)
35
  app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get('DATABASE_URL') or \\
36
  '{{database_uri}}' # Placeholder for database URI
37
  app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
38
-
39
  db = SQLAlchemy(app)
40
-
41
  class HelloWorld(db.Model):
42
  id = db.Column(db.Integer, primary_key=True)
43
  message = db.Column(db.String(128))
44
-
45
  def __repr__(self):
46
  return f'<HelloWorld {self.message}>'
47
-
48
  @app.route('/')
49
  def hello():
50
  return "Hello, Flask!"
51
-
52
  @app.route('/db_test')
53
  def db_test():
54
  try:
@@ -56,8 +49,6 @@ def db_test():
56
  return "Database connection successful!"
57
  except Exception as e:
58
  return f"Database connection failed: {e}"
59
-
60
-
61
  if __name__ == '__main__':
62
  with app.app_context(): # Create application context for DB operations
63
  db.create_all()
@@ -148,7 +139,6 @@ code {
148
  "manage.py": """#!/usr/bin/env python
149
  import os
150
  import sys
151
-
152
  if __name__ == "__main__":
153
  os.environ.setdefault("DJANGO_SETTINGS_MODULE", "myapp.settings")
154
  try:
@@ -221,10 +211,8 @@ STATIC_URL = '/static/'
221
  "myapp/urls.py": """from django.contrib import admin
222
  from django.urls import path
223
  from django.http import HttpResponse
224
-
225
  def home(request):
226
  return HttpResponse("Hello, Django!")
227
-
228
  urlpatterns = [
229
  path('admin/', admin.site.urls),
230
  path('', home, name='home'),
@@ -243,11 +231,9 @@ application = get_wsgi_application()""",
243
  "server.js": """const express = require('express')
244
  const app = express()
245
  const port = 3000
246
-
247
  app.get('/', (req, res) => {
248
  res.send('Hello World from Express!')
249
  })
250
-
251
  app.listen(port, () => {
252
  console.log(`Server listening on port ${port}`)
253
  })""",
@@ -290,7 +276,6 @@ app.listen(port, () => {
290
  "files": {
291
  "main.py": """def main():
292
  print("Hello from Python script!")
293
-
294
  if __name__ == "__main__":
295
  main()""",
296
  "requirements.txt": "",
@@ -342,8 +327,7 @@ if __name__ == "__main__":
342
  }""",
343
  "vite.config.js": """import { defineConfig } from 'vite'
344
  import react from '@vitejs/plugin-react'
345
-
346
- // https://vitejs.dev/config/
347
  export default defineConfig({
348
  plugins: [react()],
349
  })""",
@@ -364,7 +348,6 @@ export default defineConfig({
364
  import ReactDOM from 'react-dom/client'
365
  import App from './App.jsx'
366
  import './index.css'
367
-
368
  ReactDOM.createRoot(document.getElementById('root')).render(
369
  <React.StrictMode>
370
  <App />
@@ -373,15 +356,12 @@ ReactDOM.createRoot(document.getElementById('root')).render(
373
  "src/App.jsx": """import React from 'react'
374
  import { Button } from "./components/ui/button"
375
  import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "./components/ui/card"
376
-
377
-
378
  function App() {
379
  return (
380
  <div className="container mx-auto py-10">
381
  <h1 className="text-3xl font-bold text-center mb-5">
382
  Witaj w aplikacji Shadcn UI!
383
  </h1>
384
-
385
  <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
386
  <Card>
387
  <CardHeader>
@@ -393,7 +373,6 @@ function App() {
393
  <Button className="mt-4">Przycisk Akcji</Button>
394
  </CardContent>
395
  </Card>
396
-
397
  <Card>
398
  <CardHeader>
399
  <CardTitle>Karta 2</CardTitle>
@@ -404,7 +383,6 @@ function App() {
404
  <Button variant="secondary" className="mt-4">Przycisk Wtórny</Button>
405
  </CardContent>
406
  </Card>
407
-
408
  <Card className="lg:col-span-1 md:col-span-2">
409
  <CardHeader>
410
  <CardTitle>Dłuższa Karta</CardTitle>
@@ -423,76 +401,55 @@ function App() {
423
  </div>
424
  )
425
  }
426
-
427
  export default App""",
428
  "src/index.css": """@tailwind base;
429
  @tailwind components;
430
  @tailwind utilities;
431
-
432
  @layer base {
433
  :root {
434
  --background: 0 0% 100%;
435
  --foreground: 222.2 84.9% 4.9%;
436
-
437
  --card: 0 0% 100%;
438
  --card-foreground: 222.2 84.9% 4.9%;
439
-
440
  --popover: 0 0% 100%;
441
  --popover-foreground: 222.2 84.9% 4.9%;
442
-
443
  --primary: 221.2 83.2% 53.3%;
444
  --primary-foreground: 210 40% 98%;
445
-
446
  --secondary: 210 40% 96.1%;
447
  --secondary-foreground: 222.2 47.4% 11.2%;
448
-
449
  --muted: 210 40% 96.1%;
450
  --muted-foreground: 215.4 16.3% 46.9%;
451
-
452
  --accent: 210 40% 96.1%;
453
  --accent-foreground: 222.2 47.4% 11.2%;
454
-
455
  --destructive: 0 84.2% 60.2%;
456
  --destructive-foreground: 210 40% 98%;
457
-
458
  --border: 214.3 31.8% 91.4%;
459
  --input: 214.3 31.8% 91.4%;
460
  --ring: 221.2 83.2% 53.3%;
461
-
462
  --radius: 0.5rem;
463
  }
464
-
465
  .dark {
466
  --background: 222.2 84.9% 4.9%;
467
  --foreground: 210 40% 98%;
468
-
469
  --card: 222.2 84.9% 4.9%;
470
  --card-foreground: 210 40% 98%;
471
-
472
  --popover: 222.2 84.9% 4.9%;
473
  --popover-foreground: 210 40% 98%;
474
-
475
  --primary: 217.2 91.2% 59.8%;
476
  --primary-foreground: 222.2 47.4% 11.2%;
477
-
478
  --secondary: 217.2 32.6% 17.5%;
479
  --secondary-foreground: 210 40% 98%;
480
-
481
  --muted: 217.2 32.6% 17.5%;
482
  --muted-foreground: 215 20.2% 65.1%;
483
-
484
  --accent: 217.2 32.6% 17.5%;
485
  --accent-foreground: 210 40% 98%;
486
-
487
  --destructive: 0 62.8% 30.6%;
488
  --destructive-foreground: 210 40% 98%;
489
-
490
  --border: 217.2 32.6% 17.5%;
491
  --input: 217.2 32.6% 17.5%;
492
  --ring: 224.9 98.6% 67.3%;
493
  }
494
  }
495
-
496
  @layer components {
497
  .container {
498
  @apply max-w-7xl mx-auto px-4 sm:px-6 lg:px-8;
@@ -586,7 +543,6 @@ module.exports = {
586
  import { cn } from "@/lib/utils"
587
  import { Slot } from "@radix-ui/react-slot"
588
  import { cva } from "class-variance-authority";
589
-
590
  const buttonVariants = cva(
591
  "inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
592
  {
@@ -615,7 +571,6 @@ const buttonVariants = cva(
615
  },
616
  }
617
  )
618
-
619
  const Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
620
  const Comp = asChild ? Slot : "button"
621
  return (<Comp
@@ -623,64 +578,56 @@ const Button = React.forwardRef(({ className, variant, size, asChild = false, ..
623
  ref={ref} {...props} />)
624
  })
625
  Button.displayName = "Button"
626
-
627
  export { Button, buttonVariants }""",
628
  "src/components/ui/card.jsx": """import * as React from "react"
629
  import { cn } from "@/lib/utils"
630
-
631
  const Card = React.forwardRef(({ className, ...props }, ref) => (<div
632
  className={cn("rounded-lg border bg-card text-card-foreground shadow-sm", className)}
633
  ref={ref}
634
  {...props} />))
635
  Card.displayName = "Card"
636
-
637
  const CardHeader = React.forwardRef(({ className, ...props }, ref) => (<div
638
  className={cn("flex flex-col space-y-1.5 p-6", className)}
639
  ref={ref}
640
  {...props} />))
641
  CardHeader.displayName = "CardHeader"
642
-
643
  const CardTitle = React.forwardRef(({ className, ...props }, ref) => (<h3
644
  className={cn("text-lg font-semibold leading-none tracking-tight", className)}
645
  ref={ref}
646
  {...props} />))
647
  CardTitle.displayName = "CardTitle"
648
-
649
  const CardDescription = React.forwardRef(({ className, ...props }, ref) => (<p
650
  className={cn("text-sm text-muted-foreground", className)}
651
  ref={ref}
652
  {...props} />))
653
  CardDescription.displayName = "CardDescription"
654
-
655
  const CardContent = React.forwardRef(({ className, ...props }, ref) => (<div
656
  className={cn("p-6 pt-0", className)}
657
  ref={ref}
658
  {...props} />))
659
  CardContent.displayName = "CardContent"
660
-
661
  const CardFooter = React.forwardRef(({ className, ...props }, ref) => (<div
662
  className={cn("flex items-center p-6 pt-0", className)}
663
  ref={ref}
664
  {...props} />))
665
  CardFooter.displayName = "CardFooter" "node_modules/colorette": {
666
  "version": "2.0.20",
667
- "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz",
668
- "integrity": "sha512-jZz96nss5W+901Y1Y6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oY4qX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX6oYqX
 
669
  "fastapi": {
670
  "files": {
671
  "main.py": """from fastapi import FastAPI
672
 
673
  app = FastAPI()
674
 
675
- export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }""",
676
- "src/lib/utils.js": """import { clsx } from "clsx"
677
- import { twMerge } from "tailwind-merge"
678
-
679
- export function cn(...inputs) {
680
- return twMerge(clsx(inputs))
681
- }"""
682
- },
683
- "post_process": "shadcn_setup"
684
  },
685
  "nextjs": {
686
  "files": {
@@ -747,7 +694,7 @@ export default function Home() {
747
  </div>
748
  )
749
  }""",
750
- "styles/Home.module.css": """.container {
751
  min-height: 100vh;
752
  padding: 0 0.5rem;
753
  display: flex;
@@ -868,8 +815,8 @@ export default function handler(req, res) {
868
  },
869
  "node_modules/@babel/code-frame": {
870
  "version": "7.23.5",
871
- "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz",
872
- "integrity": "sha512-r1oVmeW/e7g6p+QTbdRtq8f75j4/nGpQp5iY5g5UqXkGgQ9PqeYwXw9wQ6OAy0iK+h7+hLihsIEQdGkGdtq/hA==",
873
  "dependencies": {
874
  "@babel/highlight": "^7.22.16"
875
  },
@@ -879,8 +826,8 @@ export default function handler(req, res) {
879
  },
880
  "node_modules/@babel/highlight": {
881
  "version": "7.23.4",
882
- "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz",
883
- "integrity": "sha512-d8o/0zO67QWBGq8E1H/j1R76qY2l039Zp+QZtGvC5P1r6vI1Qd1b0WJqH1R7vE+uGz+Y37R8oQO3jR2+hQY8Pw==",
884
  "dependencies": {
885
  "chalk": "^2.0.0",
886
  "esutils": "^2.0.0"
@@ -891,13 +838,13 @@ export default function handler(req, res) {
891
  },
892
  "node_modules/@cnakazawa/describe-type": {
893
  "version": "2.1.1",
894
- "resolved": "https://registry.npmjs.org/@cnakazawa/describe-type/-/describe-type-2.1.1.tgz",
895
- "integrity": "sha512-BGuJoSF3yP6wklQ6oEZe5gOOjLzS0RrjL819cEJjD9vVq/3s6y0+pD2v1fEw0yG2y/jB/aK+ZJs6oT8m0v410A=="
896
  },
897
  "node_modules/@eslint/eslintrc": {
898
  "version": "2.1.1",
899
- "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.1.tgz",
900
- "integrity": "sha512-f32gqZgmXfG56Q1K6pT0F9mzlxK9+l/5/f07yP15fL96ZkK/35kKsvP8zE0pT9L6h3rR1+7J+5B2Y/0tFpLSA==",
901
  "dependencies": {
902
  "ajv": "^6.12.2",
903
  "chalk": "^2.0.0",
@@ -915,16 +862,16 @@ export default function handler(req, res) {
915
  },
916
  "node_modules/@eslint/js": {
917
  "version": "8.52.0",
918
- "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.52.0.tgz",
919
- "integrity": "sha512-Z4w6iIavx9rO2fD4m1V37mP8tD/7ESyS+3E6a76F/g1T/ZlQ9X5d15uV4bF14Zg+s6Z2b3/vP6nUq1jG521Q==",
920
  "engines": {
921
  "node": "^10.0.0 || >= 12.0.0"
922
  }
923
  },
924
  "node_modules/@humanwhocodes/config-array": {
925
  "version": "0.11.12",
926
- "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.12.tgz",
927
- "integrity": "sha512-h6L7vJb0b81Vq+oWnKk8g+tJ/p23f1xNqJ3uIq81e0b/4P5lXgRkh7a/ZkI1fA0tE0jV5vWkI0aX+X6J3w3Q==",
928
  "dependencies": {
929
  "@humanwhocodes/object-schema": "^1.2.1",
930
  "debug": "^4.3.4",
@@ -936,16 +883,16 @@ export default function handler(req, res) {
936
  },
937
  "node_modules/@humanwhocodes/object-schema": {
938
  "version": "1.2.1",
939
- "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz",
940
- "integrity": "sha512-qH5JoF9k2b+gnhn3JRRm6ZztkqfK4KlaaGdY514GPo/s5Pq7u0bFjQ0m0R7oeqt5RbUo8GwtJp8zv71wP46Q/w==",
941
  "engines": {
942
  "node": ">=12"
943
  }
944
  },
945
  "node_modules/@jest/types": {
946
  "version": "29.6.3",
947
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz",
948
- "integrity": "sha512-Y3xw0j2bOFd+Uru+a0j1G5eHji/VvbDVO5Wp6Y759w5i00Km9tLmYmh/x9y2T5C83+R7Hv4lwaB+zMZxV2u5ng==",
949
  "dependencies": {
950
  "@types/jest": "*",
951
  "@types/node": "*",
@@ -954,31 +901,31 @@ export default function handler(req, res) {
954
  },
955
  "node_modules/@next/env": {
956
  "version": "14.0.0",
957
- "resolved": "https://registry.npmjs.org/@next/env/-/env-14.0.0.tgz",
958
- "integrity": "sha512-b+l0G7a0PqgY503cQp2L9e+7/Yc/1qG6f9+8R8b91/H0iO6819h5h32R6p5rQ5G6oPZfG3L7I6hS5Uu3gB0w=="
959
  },
960
  "node_modules/@npmcli/ci-detect": {
961
  "version": "2.0.1",
962
- "resolved": "https://registry.npmjs.org/@npmcli/ci-detect/-/ci-detect-2.0.1.tgz",
963
- "integrity": "sha512-71m408b6fE5K0o5Pz5o+l05P6M9mE0K9qR20yC78HnUj3+yQ7/Iq+6K90/O11kF+fD/6T2VvN6h+x72p7pA=="
964
  },
965
  "node_modules/@radix-ui/react-slot": {
966
- "version": "1.0.2",
967
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.2.tgz",
968
- "integrity": "sha512-d85qs4gTpz3nC1eo7LqE8ELGj3H+KzUkg85bS35P2pBcM1v/uD5dxtiYQ+75u/6Gqg2yK6o530g84e0Y8/d/dQ=="
969
  },
970
  "node_modules/@radix-ui/slot": {
971
  "version": "1.0.2",
972
- "resolved": "https://registry.npmjs.org/@radix-ui/slot/-/slot-1.0.2.tgz",
973
- "integrity": "sha512-EHyBw+h8nB4kE5l0Gj+sQj9i3yL4vL8z984h49805H01G5iFk+fL8y6E2z9l7t805z57h0t4b6lqR20x5iYrw==",
974
  "peerDependencies": {
975
  "react": "*"
976
  }
977
  },
978
  "node_modules/@rollup/plugin-commonjs": {
979
  "version": "25.0.7",
980
- "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.7.tgz",
981
- "integrity": "sha512-S60w7v72h0sF9lRz39z/p2Uo8P3fP3T4oH5xG5Jk+y1Uf+n+q5079F0Fm4w4g9Y80X/z0x72H8a69Fk+6Wbng==",
982
  "peerDependencies": {
983
  "rollup": "^1.20.0||^2||^3"
984
  },
@@ -990,8 +937,8 @@ export default function handler(req, res) {
990
  },
991
  "node_modules/@rollup/plugin-inject": {
992
  "version": "5.1.0",
993
- "resolved": "https://registry.npmjs.org/@rollup/plugin-inject/-/plugin-inject-5.1.0.tgz",
994
- "integrity": "sha512-7vI6Q7b+jQyM01ogqX+p7p08HlM0Z3M8/5y2G7792W3VzL+3iW5O0U/8nE1K+d8iP63R+Jd4/tN6Zq+28B0g==",
995
  "peerDependencies": {
996
  "rollup": "^1.20.0||^2||^3"
997
  },
@@ -1003,8 +950,8 @@ export default function handler(req, res) {
1003
  },
1004
  "node_modules/@stylistic/eslint-plugin-js": {
1005
  "version": "1.5.1",
1006
- "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-js/-/eslint-plugin-js-1.5.1.tgz",
1007
- "integrity": "sha512-iV9lQ5Wn3uP/v4g55yXy0n3u390xKqX3l1T3Z8QJ6LdM01E+f9kI0/uU+rG4lG7gI993Cj8YkE3l9pL7/2+zw==",
1008
  "dependencies": {
1009
  "@stylistic/eslint-plugin-plus": "1.5.1",
1010
  "globals": "^13.20.0"
@@ -1015,24 +962,24 @@ export default function handler(req, res) {
1015
  },
1016
  "node_modules/@stylistic/eslint-plugin-plus": {
1017
  "version": "1.5.1",
1018
- "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-plus/-/eslint-plugin-plus-1.5.1.tgz",
1019
- "integrity": "sha512-jO50R2eX9U7m60qj4W41u4o5Bq4+H0jV9U+Zf4F8y+J/72bQ+a3a1N4d033wH70/r1g0a0pE7Z8xR/H2vY8Q==",
1020
  "peerDependencies": {
1021
  "eslint": ">=8.0.0"
1022
  }
1023
  },
1024
- "node_modules/@stylistic/js": {
1025
- "version": "1.5.1",
1026
- "resolved": "https://registry.npmjs.org/@stylistic/js/-/js-1.5.1.tgz",
1027
- "integrity": "sha512-Vp0I0p0h0T53eJ6T/7yvQG304x8gZ06V9v1XQ6+f8rZ/Jd/f1u0rW2f9v7/vU+kG0l1q0i1R7gI9vL7y/v7Q==",
1028
- "engines": {
1029
- "node": ">=14.0.0"
1030
- }
1031
  },
1032
  "node_modules/@svgr/plugin-jsx": {
1033
  "version": "8.1.4",
1034
- "resolved": "https://registry.npmjs.org/@svgr/plugin-jsx/-/plugin-jsx-8.1.4.tgz",
1035
- "integrity": "sha512-57aP/11fVlqRj8G8X4lYt6o6U4h/x8F8lC+Qy0k9WdD99o7R7rJ+YJ0V9Q57h7g9iK/I/X7z9R9/93y2+y+w==",
1036
  "dependencies": {
1037
  "@babel/plugin-syntax-jsx": "^7.18.6",
1038
  "@svgr/babel-preset": "8.1.4",
@@ -1048,32 +995,32 @@ export default function handler(req, res) {
1048
  },
1049
  "node_modules/@tsconfig/cypress": {
1050
  "version": "3.0.0",
1051
- "resolved": "https://registry.npmjs.org/@tsconfig/cypress/-/cypress-3.0.0.tgz",
1052
- "integrity": "sha512-h650N/mQkL+Q0qf3jM8B7igZevlq6mOaQ8s3xxrR+Oa2v+9cWpL3Q/xWz+J4462X6Y22t+h06c65xJ+v153m/Q==",
1053
  "peerDependencies": {
1054
  "typescript": ">=4.5"
1055
  }
1056
  },
1057
  "node_modules/@tsconfig/create-react-app": {
1058
  "version": "2.0.1",
1059
- "resolved": "https://registry.npmjs.org/@tsconfig/create-react-app/-/create-react-app-2.0.1.tgz",
1060
- "integrity": "sha512-3x+n8aKj2kgYfX0gTzXvW48SzQv5dt1S5gJ5kE5dX5uI+sL0+sN8t6PqQvJ6j9k5Vw6/kU0qj6o621/v9R8nAw==",
1061
  "peerDependencies": {
1062
  "typescript": ">=3.8"
1063
  }
1064
  },
1065
  "node_modules/@tsconfig/node-lts-strictest": {
1066
  "version": "20.1.1",
1067
- "resolved": "https://registry.npmjs.org/@tsconfig/node-lts-strictest/-/node-lts-strictest-20.1.1.tgz",
1068
- "integrity": "sha512-rYw7YFf27FqQ6oD+l617sXyW0/5u+V1nSjI25h16qgR/X7vY762uXN0a/OaQp3/w8mZ3k4+Z1+j11/B3j0wsg==",
1069
  "peerDependencies": {
1070
  "typescript": ">=4.8"
1071
  }
1072
  },
1073
  "node_modules/@types/babel__core": {
1074
  "version": "7.20.3",
1075
- "resolved": "https://registry.npmjs.org/@types/babel__core/-/core-7.20.3.tgz",
1076
- "integrity": "sha512-aZgQhIq28t99p6nO75tG7rNp6XoEoz14G5L9B+Fj9Q7Z7l0+3t0c6wA837Xy6/mC9T+k5Lz9h4338T/I+5t3Q==",
1077
  "dependencies": {
1078
  "@babel/parser": "*",
1079
  "@types/babel__generator": "*",
@@ -1084,36 +1031,36 @@ export default function handler(req, res) {
1084
  },
1085
  "node_modules/@types/babel__generator": {
1086
  "version": "7.6.8",
1087
- "resolved": "https://registry.npmjs.org/@types/babel__generator/-/generator-7.6.8.tgz",
1088
- "integrity": "sha512-s212dp6eE2Q35Y4eKEtogEwDGB4v4WlV7iP01ump9zJ7lxIUmwmd09PF6iFfJjIeWf/z/xkd6rqR6MhXm/1lQ=="
1089
  },
1090
  "node_modules/@types/babel__template": {
1091
  "version": "7.4.5",
1092
- "resolved": "https://registry.npmjs.org/@types/babel__template/-/template-7.4.5.tgz",
1093
- "integrity": "sha512-o/GkPgJjSggh2ZgOh/Y70yR717qzesAiKTiWOQZgE8C7YJ7lTGy+rOZw93/JikE0616a/sOhH/bEuEpSyR/kEQ=="
1094
  },
1095
  "node_modules/@types/babel__traverse": {
1096
  "version": "7.20.5",
1097
- "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/traverse-7.20.5.tgz",
1098
- "integrity": "sha512-7d7L9o+s+2hQi/j7PZ+2HnJ7KzW5Qx8K5bQc+2/1P0xWnKx3/uTfH0vK6+R2yK9v8L7I3F1/qG3sQ+j47wLQQ==",
1099
  "dependencies": {
1100
  "@types/babel__parser": "*"
1101
  }
1102
  },
1103
  "node_modules/@types/chalk": {
1104
  "version": "2.2.0",
1105
- "resolved": "https://registry.npmjs.org/@types/chalk/-/chalk-2.2.0.tgz",
1106
- "integrity": "sha512-hQ+MGRoC9yY86Wpdr7jsQPU08Jmn2iJfVd9mE996nZruHkP4jSK9LQNJ944gV6qi9R2m/mFgnn0K/47WLo8XQ=="
1107
  },
1108
  "node_modules/@types/color-name": {
1109
  "version": "1.1.3",
1110
- "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.3.tgz",
1111
- "integrity": "sha512-rEuNlgRBRo6+FQVuB003v/pjpiyQcxW/Vv+PauQznqJZHoPQG+WJvGmG2jY/fCIE29Z2kSCLs9v0p/fE/h83YQ=="
1112
  },
1113
  "node_modules/@types/eslint": {
1114
  "version": "8.44.7",
1115
- "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.7.tgz",
1116
- "integrity": "sha512-W7s9L7hY4cW00+DkVW85w/w+s8x/7vQz4h9c4F6F2P6dK15v8c1uFfF2qB3XJ2J+s8c/e5tWz4J/P/9w844/g==",
1117
  "dependencies": {
1118
  "@jest/types": "*",
1119
  "@types/estree": "*",
@@ -1123,26 +1070,26 @@ export default function handler(req, res) {
1123
  },
1124
  "node_modules/@types/estree": {
1125
  "version": "2.0.0",
1126
- "resolved": "https://registry.npmjs.org/@types/estree/-/estree-2.0.0.tgz",
1127
- "integrity": "sha512-jGm4w4jQtR51rA3Oz4y993U9lV9qKZuQ1iE+4qvOaE7CZ3YkR2pZ5j3YxW61010W0q8GkF/8n2pL4P+2/0iZ4w=="
1128
  },
1129
  "node_modules/@types/glob": {
1130
  "version": "8.1.0",
1131
- "resolved": "https://registry.npmjs.org/@types/glob/-/glob-8.1.0.tgz",
1132
- "integrity": "sha512-p4P75IPy+wRLfW3j90o0nkU5bRdEpa4ScaWw9P6i8h1YhJ48E/i8E9e1uK6r7bU8f7J8vXh/4FkQ6r2zO9xvg==",
1133
  "dependencies": {
1134
  "@types/node": "*"
1135
  }
1136
  },
1137
  "node_modules/@types/hoist-non-react-statics": {
1138
  "version": "3.3.1",
1139
- "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz",
1140
- "integrity": "sha512-gS39b7x0QhQ0L5q6C0R55wQK1gpL5EvS5x6n6T18x/Vj3W7bXjTKhbEIm78g4zlq62x952y3o3L/1XW7jQe/Q=="
1141
  },
1142
  "node_modules/@types/jest": {
1143
  "version": "29.5.5",
1144
- "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.5.tgz",
1145
- "integrity": "sha512-H2mD3q3xi1vKPs/rG4e8b7H4k7qO5hH+WqR0nK7K86Gt0p82a8g6N/q+EPZ8zK7Xg206R04zXz8V0r7X+56hQ==",
1146
  "dependencies": {
1147
  "@types/estree": "*",
1148
  "@types/node": "*",
@@ -1154,46 +1101,46 @@ export default function handler(req, res) {
1154
  },
1155
  "node_modules/@types/json-schema": {
1156
  "version": "7.0.12",
1157
- "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz",
1158
- "integrity": "sha512-0b9lYoHjh191cZxC1kK0E9oXwQo8X56/00C7mXzV10e8TjE5p5c4j7rR+O7oE754wL9b330A+9g4v8/gJ3pvw=="
1159
  },
1160
  "node_modules/@types/json5": {
1161
  "version": "0.0.2",
1162
- "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.2.tgz",
1163
- "integrity": "sha512-e4cWl1rN+1g6D6iWzB0i9r8o+8a4+V7K+d6u07Q/h3f9W6uWuh08OW/zK+a4fFzXj23x5o07J1Gk581V2k/kQ=="
1164
  },
1165
  "node_modules/@types/minimatch": {
1166
  "version": "5.1.0",
1167
- "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.0.tgz",
1168
- "integrity": "sha512-Q57VIM8zYQoH8mD/1m2kI8mFIm9sHwK2sJEqSjBvK/4yB+S5C9t2/5jWJvXb4w/w2v7a4u7i37w59eI/9sY9w=="
1169
  },
1170
  "node_modules/@types/node": {
1171
  "version": "20.8.9",
1172
- "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.9.tgz",
1173
- "integrity": "sha512-P/x424wla9p7pSHdkpPxbP9C+8hJ5Lvt9qWyK6PfGwzlrr/bXLj9i4YUkcQg3d6wS7WlZCWK8fH3WGEeQvH0oA=="
1174
  },
1175
  "node_modules/@types/parse-json": {
1176
  "version": "4.0.0",
1177
- "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz",
1178
- "integrity": "sha512-06CvHn7fFQ3/nQk8do0ncgYhV/W2R9lFpnuwD3n1aQyYg+m/b02/kHw68Uq88JgM6bWpC42GzK20z+1s8m39wA=="
1179
  },
1180
  "node_modules/@types/prettier": {
1181
  "version": "2.7.3",
1182
- "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz",
1183
- "integrity": "sha512-5m4295s14mS1Wy5KDO/aEo4VXLv9hXpYc4h3Wq3k3/E5PZGrN2W4B6iC7mUfKjG5xG3aF4w7ZtQ4/6uN5j3/wA=="
1184
  },
1185
  "node_modules/@types/promises-aplus": {
1186
  "version": "2.0.5",
1187
- "resolved": "https://registry.npmjs.org/@types/promises-aplus/-/promises-aplus-2.0.5.tgz",
1188
- "integrity": "sha512-lX7QJcIRyK1L30YPrkF3l9L310y/nQ4E517F4GvG8lBwA9T46jP3p59G18+YfB0pX14YvC5P6wZ9s24e1fWvg==",
1189
  "dependencies": {
1190
  "@types/node": "*"
1191
  }
1192
  },
1193
  "node_modules/@types/react": {
1194
  "version": "18.2.33",
1195
- "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.33.tgz",
1196
- "integrity": "sha512-lmgB341w2K0VpY4X4sE2Z41i0n/0j/6W2/WpG+sP+1q88bA6xW/lC1f8o1T5e1g3/dJ2/P+J/v5i2aQnFv6Q==",
1197
  "dependencies": {
1198
  "@types/prop-types": "*",
1199
  "@types/scheduler": "*",
@@ -1202,49 +1149,49 @@ export default function handler(req, res) {
1202
  },
1203
  "node_modules/@types/react-dom": {
1204
  "version": "18.2.14",
1205
- "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.14.tgz",
1206
- "integrity": "sha512-qsc2jF0hJOmJ98Uvp9Xw9PHz1yvY/H26Mv7L69Y+o7a0w7iK6m/6/9t+w5520e4iN0Z06996/m45U+oQW9i7Q==",
1207
  "dependencies": {
1208
  "@types/react": "*"
1209
  }
1210
  },
1211
  "node_modules/@types/resolve": {
1212
  "version": "1.20.2",
1213
- "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz",
1214
- "integrity": "sha512-5pLuotWzR/lZ55yC7/5803bw0dPd1k4p1w1e/Kk/9K7/o96w2T7hP1gqJ5wOq6p/wO+01+j9g8+d5iS/d8G7w=="
1215
  },
1216
  "node_modules/@types/scheduler": {
1217
  "version": "0.16.4",
1218
- "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.4.tgz",
1219
- "integrity": "sha512-/8919kS57o10+XNP2+JzuP+L5f2f8/24pX6W5g0Q+R/n+k+rP/bKz7rXw3fF4J/cK/rR9+aW9iR9+fR8X48/w=="
1220
  },
1221
  "node_modules/@types/semver": {
1222
  "version": "7.5.3",
1223
- "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.3.tgz",
1224
- "integrity": "sha512-UA5rG29H/o/5eOa01+SfhQz5bTf18H2Z8QpxL7d7e9QvXvUcd9qjQZ1GjF8xQ+wH7P9+v3QZ3vL0W9m8oE4aQ=="
1225
  },
1226
  "node_modules/@types/stack-trace-parser": {
1227
  "version": "1.3.2",
1228
- "resolved": "https://registry.npmjs.org/@types/stack-trace-parser/-/stack-trace-parser-1.3.2.tgz",
1229
- "integrity": "sha512-lS22pAP3vKi4k26z/0p3Q5p7S5wVn+kE5E3e9176E+92sT7s3kXF7q0Qz+eW7fX8xVv8s33K/4yK6/R564B1g=="
1230
  },
1231
  "node_modules/@types/testing-library__dom": {
1232
  "version": "7.5.0",
1233
- "resolved": "https://registry.npmjs.org/@types/testing-library__dom/-/dom-7.5.0.tgz",
1234
- "integrity": "sha512-U03yV676K92B49s8w8oP97L5r1/rN4eF/c8Yg/cE6+o+yU6Q/l0/B6Z+9f/70H5WvR5vF30f7o97I7/wJqFfQ==",
1235
  "dependencies": {
1236
  "@types/node": "*"
1237
  }
1238
  },
1239
  "node_modules/@types/ungap__structured-clone": {
1240
  "version": "0.3.0",
1241
- "resolved": "https://registry.npmjs.org/@types/ungap__structured-clone/-/structured-clone-0.3.0.tgz",
1242
- "integrity": "sha512-wznUj/nBo3oQy1218b9oEoxE3V/G/wR97lQun90N3/8du/kO10/vE2e8XW/s6vj80Xb+J0rK3l18rP8p2Z52qA=="
1243
  },
1244
  "node_modules/@vercel/nft": {
1245
  "version": "0.25.0",
1246
- "resolved": "https://registry.npmjs.org/@vercel/nft/-/nft-0.25.0.tgz",
1247
- "integrity": "sha512-n0w/n66/j2+j4sZ7tK92zH1z/hZ1/i52+n+5+7/n/1/n/7/n/6/n5uH0n7p/s71n7/57703+77t02r3A==",
1248
  "dependencies": {
1249
  "@types/glob": "^8.0.0",
1250
  "cacache": "^16.1.0",
@@ -1261,8 +1208,8 @@ export default function handler(req, res) {
1261
  },
1262
  "node_modules/ajv": {
1263
  "version": "6.12.6",
1264
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
1265
- "integrity": "sha512-j5sQCJoefcpga1o5ajgMochi4fVUyyruuvlWqjKObkhEW/5b0k7xfQEkj5Q6aCw0uF6RJ3XhKtKjY+gBAIEepA==",
1266
  "dependencies": {
1267
  "fast-deep-equal": "^3.1.1",
1268
  "json-schema-traverse": "^0.4.1",
@@ -1274,8 +1221,8 @@ export default function handler(req, res) {
1274
  },
1275
  "node_modules/ansi-styles": {
1276
  "version": "3.2.1",
1277
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
1278
- "integrity": "sha512-gnPPBMb7Uv3r6FnC9j9q4v+J/v9YFzO0QWfH0WeN48psgrgE/jR0H2GGg6wT1baL1j77V3X/CjYv4b1p33J4g==",
1279
  "dependencies": {
1280
  "color-convert": "^1.9.0"
1281
  },
@@ -1285,16 +1232,16 @@ export default function handler(req, res) {
1285
  },
1286
  "node_modules/arg": {
1287
  "version": "5.0.2",
1288
- "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz",
1289
- "integrity": "sha512-H-sU9a635Q/R57P+l8cUTnB8/N+99f8Q1f0qQp/l2s9gZ2R/q6hLq5zO5s1P1g0nO6f8n1g0n6f8g8g8/g==",
1290
  "engines": {
1291
  "node": ">=14"
1292
  }
1293
  },
1294
  "node_modules/assert": {
1295
  "version": "1.5.0",
1296
- "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz",
1297
- "integrity": "sha512-n8QrIxW+1oE3vN8t8/wWu55lFm/s5k9fQj/vRTI/Vn7mC/Rsp/s4yZ7v/fM155y+91Q9t24yv0e9ZfG88H0xg==",
1298
  "dependencies": {
1299
  "ieee754": "^1.1.13",
1300
  "util": "0.10.4"
@@ -1302,8 +1249,8 @@ export default function handler(req, res) {
1302
  },
1303
  "node_modules/autoprefixer": {
1304
  "version": "10.4.16",
1305
- "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.16.tgz",
1306
- "integrity": "sha512-vyNnHpA1Q0lp4/vOQhR14FMtB9W6As6O7l2+K4uE0b4vJxY4kxlw7a+Zit5zW3ipZ8uKq0HnYO1B7c5k2a+7Aw==",
1307
  "dependencies": {
1308
  "browserslist": "^4.22.1",
1309
  "caniuse-lite": "1.0.30015751",
@@ -1323,13 +1270,13 @@ export default function handler(req, res) {
1323
  },
1324
  "node_modules/balanced-match": {
1325
  "version": "1.0.2",
1326
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
1327
- "integrity": "sha512-3oSeUO0tmvyZgL6nAGlpdpYBalzKHxRmjtOPknjbbtN9ynoDLzPu7GaRs1jQ8WYxBaNWnPSpNrp37jtDZvQg=="
1328
  },
1329
  "node_modules/browserslist": {
1330
  "version": "4.22.2",
1331
- "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz",
1332
- "integrity": "sha512-W1yqp8T5wzMvK4y1E/L6vS45b/n7W4yqS0Yy/T1v6/89G/Z5Y3Lp1qXlP1qW1p0qXlP1v6/89G/Z5Y3Lp1qXlP1v6w==",
1333
  "funding": {
1334
  "type": "opencollective",
1335
  "url": "https://opencollective.com/browserslist"
@@ -1340,8 +1287,8 @@ export default function handler(req, res) {
1340
  },
1341
  "node_modules/cacache": {
1342
  "version": "16.1.1",
1343
- "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.1.tgz",
1344
- "integrity": "sha512-m4yP7k8eM0W/L/3h/m9xR0V54a9n2t7q/9K/1a30f/2+w87g/s9w/s7w9z7+w+w87/w+w7z7z7z8w==",
1345
  "dependencies": {
1346
  "@npmcli/ci-detect": "^2.0.0",
1347
  "@npmcli/fs": "^3.1.0",
@@ -1365,19 +1312,21 @@ export default function handler(req, res) {
1365
  },
1366
  "node_modules/camelcase": {
1367
  "version": "6.3.0",
1368
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",
1369
- "integrity": "sha512-GvgU7Ghcx9YvEfB9LQjY1UgW99bXG1P6i0pYW1Ia+m4QnbaPwKqt53dUQWsgr17rEzqj26ykQC6JE5/yL0yA==",
1370
  "engines": {
1371
  "node": ">=10"
1372
  }
1373
  },
1374
  "node_modules/caniuse-lite": {
1375
  "version": "1.0.30015751",
1376
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30015751.tgz",
1377
- "integrity": "sha512-p/L+Qo1lZ6b0h7mGf+86c3WqXQ/T0e1QkKj7YqP5Q+45c/p5d/i+e+e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/e/p5d/p7P+
1378
- "version": "1.2.0",
1379
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
1380
- "integrity": "sha512-5nb/n9CJFt1zlOlkAHgZ4rXoEcQp9K7wB+4dJmRbnGfE6GfZo9v12qZ4e7K3oYg9f309gU88z6sH+b/c81Y0yg==",
 
 
1381
  "dependencies": {
1382
  "ansi-styles": "^3.2.1",
1383
  "escape-string-regexp": "^1.0.5",
@@ -1389,8 +1338,8 @@ export default function handler(req, res) {
1389
  },
1390
  "node_modules/chokidar": {
1391
  "version": "3.5.3",
1392
- "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
1393
- "integrity": "sha512-gNnaePLIqt4JTDVtkmvg3S/r97FtEQOzjEUWnM/23m3yUK56qTzGYswLsE8P9Ozu1zgQtSzCAOxlxGvRZ9+Bg==",
1394
  "dependencies": {
1395
  "anymatch": "~3.1.3",
1396
  "braces": "~3.0.2",
@@ -1409,34 +1358,34 @@ export default function handler(req, res) {
1409
  },
1410
  "node_modules/chownr": {
1411
  "version": "3.0.0",
1412
- "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz",
1413
- "integrity": "sha512-jWP+795S/oH3bEgomrVpL8eN+3x0j5br8J543L6+uB8zWJ3mYg8Uv/F6fO8j0sJt1lV/1L3vF4jU0I0A0O8bA==",
1414
  "engines": {
1415
  "node": ">=12"
1416
  }
1417
  },
1418
  "node_modules/class-variance-authority": {
1419
  "version": "0.7.0",
1420
- "resolved": "https://registry.npmjs.org/class-variance-authority/-/class-variance-authority-0.7.0.tgz",
1421
- "integrity": "sha512-7+QkS/T9kCq0n+V4mR9q0dG3P7w1z9tI3sHhxt7Z5K/S2i5T3/o8h2R1/R5O3uK1+0Y3t3nK2/S5W5B5C5C5Q=="
1422
  },
1423
  "node_modules/cli-boxes": {
1424
  "version": "2.2.1",
1425
- "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz",
1426
- "integrity": "sha512-y4/rdiJOTz5H6f1dRRZuC/rW9XlJ08q4CCTgX+30S6s6V/T2dOS5i+d+K67y8fL2B9B+s/5b/9y5j0i8y9J4g==",
1427
  "engines": {
1428
  "node": ">=12"
1429
  }
1430
  },
1431
  "node_modules/clsx": {
1432
  "version": "2.1.0",
1433
- "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.0.tgz",
1434
- "integrity": "sha512-R++QW9lX8R4w/t+gV2Rr4o3w63j09/Y4OQ1hB/7+Z5o6h2+0W4lXw5jU2/Xl7z+p6f7g4z8x9v2z8x9v2w=="
1435
  },
1436
  "node_modules/color-convert": {
1437
  "version": "1.9.3",
1438
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
1439
- "integrity": "sha512-v7KKlGqrjJ/IspVj2VVVt3tH/JVOsUYim3TpQg2ez/oeai6sdw+j+3l7YPP3gEZtXD+A/1iue/0AaRb9h9ejw==",
1440
  "dependencies": {
1441
  "color-name": "1.1.3"
1442
  },
@@ -1446,28 +1395,25 @@ export default function handler(req, res) {
1446
  },
1447
  "node_modules/color-name": {
1448
  "version": "1.1.3",
1449
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
1450
- "integrity": "sha512-72fsenjCmErZkjoKx92vdYh/Y67x5m76WysUe1Y9xP0V8zVz/pWlV6c7mU+s/g8Q/g8q7+3y5g0p7h6H8j9h9w==",
1451
  "engines": {
1452
  "node": ">=0.1.90"
1453
  }
1454
  },
1455
- "fastapi": {
1456
- "files": {
1457
- "main.py": """from fastapi import FastAPI
1458
 
1459
- app = FastAPI()
 
 
 
1460
 
1461
- @app.get("/")
1462
- async def read_root():
1463
- return {"Hello": "World from FastAPI"}
1464
- """,
1465
- "requirements.txt": "fastapi\nuvicorn",
1466
- ".gitignore": "__pycache__/\nvenv/\n"
1467
- }
1468
  },
1469
  }
1470
-
1471
  def get_file_content(owner, repo_name, path, branch="main"):
1472
  """Fetches file content from a GitHub repository."""
1473
  url = f"https://raw.githubusercontent.com/{owner}/{repo_name}/{branch}/{path}"
@@ -1477,14 +1423,10 @@ def get_file_content(owner, repo_name, path, branch="main"):
1477
  return response.text
1478
  except requests.exceptions.RequestException as e:
1479
  return f"Error fetching file: {e}"
1480
-
1481
-
1482
  def extract_repo_info(url):
1483
  """Extracts owner and repo name from a GitHub URL."""
1484
  match = re.search(r"github\.com/([^/]+)/([^/]+)", url)
1485
  return match.group(1), match.group(2) if match else (None, None)
1486
-
1487
-
1488
  def analyze_file_content(content, file_path):
1489
  """Analyzes file content and returns statistics."""
1490
  lines = content.splitlines()
@@ -1496,8 +1438,6 @@ def analyze_file_content(content, file_path):
1496
  "word_count": word_count,
1497
  "file_extension": file_extension,
1498
  }
1499
-
1500
-
1501
  def github_tool(
1502
  action: str,
1503
  repo_name: str = None,
@@ -1529,7 +1469,6 @@ def github_tool(
1529
  ):
1530
  """Manages GitHub repositories."""
1531
  user = g.get_user()
1532
-
1533
  try:
1534
  if action == "import_repository":
1535
  if not all([owner, repo_name, vcs_url]):
@@ -1539,7 +1478,6 @@ def github_tool(
1539
  return "Repository already exists."
1540
  except GithubException:
1541
  pass
1542
-
1543
  headers = {
1544
  'Authorization': f'token {GITHUB_TOKEN}',
1545
  'Accept': 'application/vnd.github.v3+json',
@@ -1548,13 +1486,11 @@ def github_tool(
1548
  response = requests.put(import_url, json={'vcs_url': vcs_url, 'vcs': 'git'}, headers=headers)
1549
  response.raise_for_status()
1550
  return "Repository import started."
1551
-
1552
  elif action == "create_repository":
1553
  if not repo_name:
1554
  raise ValueError("Missing parameter: repo_name")
1555
  repo = user.create_repo(name=repo_name)
1556
  return f"Repository **{repo_name}** created! [Open repository]({repo.html_url})"
1557
-
1558
  elif action == "create_project_from_template":
1559
  if not all([repo_name, template_name]):
1560
  raise ValueError("Missing parameters: repo_name, template_name")
@@ -1564,26 +1500,20 @@ def github_tool(
1564
  )
1565
  repo = user.create_repo(name=repo_name)
1566
  template = PROJECT_TEMPLATES[template_name]
1567
-
1568
  template_params_final = {}
1569
  if "params" in template:
1570
  for param_name, param_config in template["params"].items():
1571
  template_params_final[param_name] = template_params.get(param_name, param_config.get("default")) if template_params else param_config.get("default")
1572
-
1573
  repo_name_snake_case = repo_name.replace("-", "_")
1574
  readme_filename = "README.md"
1575
-
1576
  env = jinja2.Environment()
1577
-
1578
  for file_path, file_content in template["files"].items():
1579
  final_file_path = file_path
1580
  final_file_content = file_content
1581
-
1582
  if "rename_files" in template:
1583
  for old_name, new_name_template in template["rename_files"].items():
1584
  if file_path == old_name:
1585
  final_file_path = new_name_template.replace("{{repo_name_snake_case}}", repo_name_snake_case).replace("{{repo_name}}", repo_name).replace("{{readme_filename}}", readme_filename)
1586
-
1587
  template_render = env.from_string(final_file_content)
1588
  final_file_content = template_render.render(
1589
  repo_name=repo_name,
@@ -1591,14 +1521,12 @@ def github_tool(
1591
  readme_filename=readme_filename,
1592
  **template_params_final
1593
  )
1594
-
1595
  repo.create_file(
1596
  final_file_path,
1597
  f"Create {final_file_path} from template {template_name}",
1598
  final_file_content,
1599
  branch="main",
1600
  )
1601
-
1602
  if "post_process" in template:
1603
  post_process_action = template["post_process"]
1604
  if post_process_action == "install_dependencies":
@@ -1619,16 +1547,13 @@ Po wykonaniu tych kroków, Twoja aplikacja Shadcn UI będzie w pełni skonfiguro
1619
  return f"Repository **{repo_name}** created from template **{template_name}**! [Open repository]({repo.html_url})\n\n{instructions}"
1620
  else:
1621
  print(f"Unknown post-process action: {post_process_action}")
1622
-
1623
  return f"Repository **{repo_name}** created from template **{template_name}**! [Open repository]({repo.html_url})"
1624
-
1625
  elif action == "create_file":
1626
  if not all([repo_name, path, content, message]):
1627
  raise ValueError("Missing parameters: repo_name, path, content, message")
1628
  repo = user.get_repo(repo_name)
1629
  repo.create_file(path, message, content, branch=branch)
1630
  return f"File **`{path}`** created in repository **`{repo_name}`** on branch **`{branch}`**."
1631
-
1632
  elif action == "get_file":
1633
  if not all([repo_name, path]):
1634
  raise ValueError("Missing parameters: repo_name, path")
@@ -1637,13 +1562,11 @@ Po wykonaniu tych kroków, Twoja aplikacja Shadcn UI będzie w pełni skonfiguro
1637
  return (
1638
  f"File content of **`{path}`** from **`{repo_name}`**:\n\n`\n{file_content.decoded_content.decode()}\n`"
1639
  )
1640
-
1641
  elif action == "get_file_content_by_url":
1642
  if not file_url:
1643
  raise ValueError("Missing parameter: file_url")
1644
  file_content = get_file_content(None, None, None, None)
1645
  return f"File content from URL **`{file_url}`**:\n\n`\n{file_content}\n`"
1646
-
1647
  elif action == "delete_file":
1648
  if not all([repo_name, path]):
1649
  raise ValueError("Missing parameters: repo_name, path")
@@ -1651,7 +1574,6 @@ Po wykonaniu tych kroków, Twoja aplikacja Shadcn UI będzie w pełni skonfiguro
1651
  file_contents = repo.get_contents(path, ref=branch)
1652
  repo.delete_file(path, "Delete file", file_contents.sha, branch=branch)
1653
  return f"File **`{path}`** deleted from repository **`{repo_name}`** on branch **`{branch}`**."
1654
-
1655
  elif action == "update_file":
1656
  if not all([repo_name, path, content, message]):
1657
  raise ValueError("Missing parameters: repo_name, path, content, message")
@@ -1659,32 +1581,24 @@ Po wykonaniu tych kroków, Twoja aplikacja Shadcn UI będzie w pełni skonfiguro
1659
  file_contents = repo.get_contents(path, ref=branch)
1660
  repo.update_file(path, message, content, file_contents.sha, branch=branch)
1661
  return f"File **`{path}`** updated in repository **`{repo_name}`** on branch **`{branch}`**."
1662
-
1663
  elif action == "update_file_diff":
1664
  if not all([repo_name, path, diff, diff_message]):
1665
  raise ValueError("Missing parameters: repo_name, path, diff, diff_message")
1666
  repo = user.get_repo(repo_name)
1667
  file_contents = repo.get_contents(path, ref=branch)
1668
  current_content_text = file_contents.decoded_content.decode()
1669
-
1670
  dmp = diff_match_patch()
1671
-
1672
  try:
1673
  patches = dmp.patch_fromText(diff)
1674
  except ValueError:
1675
  raise ValueError("Invalid patch format. Please provide a valid patch in 'diff' format.")
1676
-
1677
  patched_content_tuple = dmp.patch_apply(patches, current_content_text)
1678
  patched_content_text = patched_content_tuple[0]
1679
  patch_results = patched_content_tuple[1]
1680
-
1681
  if not any(patch_results):
1682
  raise ValueError("Failed to apply patch. Diff might be outdated or invalid.")
1683
-
1684
  repo.update_file(path, diff_message, patched_content_text, file_contents.sha, branch=branch)
1685
  return f"File **`{path}`** updated using diff in repository **`{repo_name}`** on branch **`{branch}`**."
1686
-
1687
-
1688
  elif action == "list_branches":
1689
  if not repo_name:
1690
  raise ValueError("Missing parameter: repo_name")
@@ -1692,7 +1606,6 @@ Po wykonaniu tych kroków, Twoja aplikacja Shadcn UI będzie w pełni skonfiguro
1692
  branches = repo.get_branches()
1693
  branch_list = "\n".join([f"- `{branch.name}`" for branch in branches])
1694
  return f"Branches in repository **`{repo_name}`**:\n{branch_list}"
1695
-
1696
  elif action == "create_branch":
1697
  if not all([repo_name, base, head]):
1698
  raise ValueError("Missing parameters: repo_name, base, head")
@@ -1700,21 +1613,18 @@ Po wykonaniu tych kroków, Twoja aplikacja Shadcn UI będzie w pełni skonfiguro
1700
  source_branch = repo.get_branch(base)
1701
  repo.create_git_ref(ref=f"refs/heads/{head}", sha=source_branch.commit.sha)
1702
  return f"Branch **`{head}`** created from **`{base}`** in repository **`{repo_name}`**."
1703
-
1704
  elif action == "delete_branch":
1705
  if not all([repo_name, branch]):
1706
  raise ValueError("Missing parameters: repo_name, branch")
1707
  repo = user.get_repo(repo_name)
1708
  repo.get_git_ref(f"heads/{branch}").delete()
1709
  return f"Branch **`{branch}`** deleted from repository **`{repo_name}`**."
1710
-
1711
  elif action == "create_pull_request":
1712
  if not all([repo_name, title, body, base, head]):
1713
  raise ValueError("Missing parameters: repo_name, title, body, base, head")
1714
  repo = user.get_repo(repo_name)
1715
  pr = repo.create_pull(title=title, body=body, base=base, head=head)
1716
  return f"Pull request created! [Open Pull Request]({pr.html_url})"
1717
-
1718
  elif action == "list_open_pull_requests":
1719
  if not repo_name:
1720
  raise ValueError("Missing parameter: repo_name")
@@ -1724,14 +1634,12 @@ Po wykonaniu tych kroków, Twoja aplikacja Shadcn UI będzie w pełni skonfiguro
1724
  return f"No open pull requests in repository **`{repo_name}`**."
1725
  prs_list = "\n".join([f"- [{pr.title}]({pr.html_url})" for pr in open_prs])
1726
  return f"Open pull requests in repository **`{repo_name}`**:\n{prs_list}"
1727
-
1728
  elif action == "create_issue":
1729
  if not all([repo_name, title, body]):
1730
  raise ValueError("Missing parameters: repo_name, title, body")
1731
  repo = user.get_repo(repo_name)
1732
  issue = repo.create_issue(title=title, body=body)
1733
  return f"Issue created! [Open Issue]({issue.html_url})"
1734
-
1735
  elif action == "list_issues":
1736
  if not repo_name:
1737
  raise ValueError("Missing parameter: repo_name")
@@ -1741,7 +1649,6 @@ Po wykonaniu tych kroków, Twoja aplikacja Shadcn UI będzie w pełni skonfiguro
1741
  return f"No open issues in repository **`{repo_name}`**."
1742
  issues_list = "\n".join([f"- [{issue.title}]({issue.html_url})" for issue in issues])
1743
  return f"Open issues in repository **`{repo_name}`**:\n{issues_list}"
1744
-
1745
  elif action == "add_label_to_issue":
1746
  if not all([repo_name, issue_number, labels]):
1747
  raise ValueError("Missing parameters: repo_name, issue_number, labels")
@@ -1752,7 +1659,6 @@ Po wykonaniu tych kroków, Twoja aplikacja Shadcn UI będzie w pełni skonfiguro
1752
  return (
1753
  f"Labels **`{labels}`** added to issue **#{issue_number}** in repository **`{repo_name}`**."
1754
  )
1755
-
1756
  elif action == "close_issue":
1757
  if not all([repo_name, issue_number]):
1758
  raise ValueError("Missing parameters: repo_name, issue_number")
@@ -1760,7 +1666,6 @@ Po wykonaniu tych kroków, Twoja aplikacja Shadcn UI będzie w pełni skonfiguro
1760
  issue = repo.get_issue(number=int(issue_number))
1761
  issue.edit(state='closed')
1762
  return f"Issue **#{issue_number}** closed in repository **`{repo_name}`**."
1763
-
1764
  elif action == "add_comment_to_issue":
1765
  if not all([repo_name, issue_number, message]):
1766
  raise ValueError("Missing parameters: repo_name, issue_number, message")
@@ -1768,7 +1673,6 @@ Po wykonaniu tych kroków, Twoja aplikacja Shadcn UI będzie w pełni skonfiguro
1768
  issue = repo.get_issue(number=int(issue_number))
1769
  issue.create_comment(body=message)
1770
  return f"Comment added to issue **#{issue_number}** in repository **`{repo_name}`**."
1771
-
1772
  elif action == "create_release":
1773
  if not all([repo_name, tag, name, message]):
1774
  raise ValueError("Missing parameters: repo_name, tag, name, message")
@@ -1777,7 +1681,6 @@ Po wykonaniu tych kroków, Twoja aplikacja Shadcn UI będzie w pełni skonfiguro
1777
  return (
1778
  f"Release **`{name}`** created in repository **`{repo_name}`**! [Open Release]({release.html_url})"
1779
  )
1780
-
1781
  elif action == "list_releases":
1782
  if not repo_name:
1783
  raise ValueError("Missing parameter: repo_name")
@@ -1787,14 +1690,12 @@ Po wykonaniu tych kroków, Twoja aplikacja Shadcn UI będzie w pełni skonfiguro
1787
  return f"No releases in repository **`{repo_name}`**."
1788
  releases_list = "\n".join([f"- [{release.tag_name}]({release.html_url})" for release in releases])
1789
  return f"Releases in repository **`{repo_name}`**:\n{releases_list}"
1790
-
1791
  elif action == "fork_repository":
1792
  if not repo_name:
1793
  raise ValueError("Missing parameter: repo_name")
1794
  repo = g.get_repo(repo_name)
1795
  fork = user.create_fork(repo)
1796
  return f"Repository **`{repo_name}`** forked! [Open fork]({fork.html_url})"
1797
-
1798
  elif action == "list_forks":
1799
  if not repo_name:
1800
  raise ValueError("Missing parameter: repo_name")
@@ -1804,7 +1705,6 @@ Po wykonaniu tych kroków, Twoja aplikacja Shadcn UI będzie w pełni skonfiguro
1804
  return f"No forks of repository **`{repo_name}`**."
1805
  forks_list = "\n".join([f"- [{fork.full_name}]({fork.html_url})" for fork in forks])
1806
  return f"Forks of repository **`{repo_name}`**:\n{forks_list}"
1807
-
1808
  elif action == "list_files":
1809
  if not all([owner, repo_name]):
1810
  raise ValueError("Missing parameters: owner, repo_name")
@@ -1814,7 +1714,6 @@ Po wykonaniu tych kroków, Twoja aplikacja Shadcn UI będzie w pełni skonfiguro
1814
  return f"No files in path **`{path}`** of repository **`{repo_name}`**."
1815
  files_list = "\n".join([f"- [{content.name}]({content.download_url})" for content in contents])
1816
  return f"Files in path **`{path}`** of repository **`{repo_name}`**:\n{files_list}"
1817
-
1818
  elif action == "get_repository_info":
1819
  if not all([owner, repo_name]):
1820
  raise ValueError("Missing parameters: owner, repo_name")
@@ -1833,7 +1732,6 @@ Po wykonaniu tych kroków, Twoja aplikacja Shadcn UI będzie w pełni skonfiguro
1833
  }
1834
  info_md = "\n".join([f"- **{key}**: {value}" for key, value in info.items()])
1835
  return f"Repository info for **`{repo_name}`**:\n{info_md}"
1836
-
1837
  elif action == "get_file_content":
1838
  if not all([owner, repo_name, path]):
1839
  raise ValueError("Missing parameters: owner, repo_name, path")
@@ -1841,14 +1739,12 @@ Po wykonaniu tych kroków, Twoja aplikacja Shadcn UI będzie w pełni skonfiguro
1841
  return (
1842
  f"File content of **`{path}`** from repository **`{repo_name}`**:\n\n`\n{content_text}\n`"
1843
  )
1844
-
1845
  elif action == "analyze_repository_by_url":
1846
  if not repo_url:
1847
  raise ValueError("Missing parameter: repo_url")
1848
  owner, repo_name = extract_repo_info(repo_url)
1849
  if not owner or not repo_name:
1850
  raise ValueError("Invalid repository URL")
1851
-
1852
  repo = g.get_repo(f"{owner}/{repo_name}")
1853
  contents = repo.get_contents("")
1854
  file_analyses = []
@@ -1869,7 +1765,6 @@ Po wykonaniu tych kroków, Twoja aplikacja Shadcn UI będzie w pełni skonfiguro
1869
  for f in file_analyses
1870
  ])
1871
  return analysis_md
1872
-
1873
  elif action == "analyze_repository_content":
1874
  if not all([owner, repo_name]):
1875
  raise ValueError("Missing parameters: owner, repo_name")
@@ -1893,21 +1788,18 @@ Po wykonaniu tych kroków, Twoja aplikacja Shadcn UI będzie w pełni skonfiguro
1893
  for f in file_analyses
1894
  ])
1895
  return analysis_md
1896
-
1897
  elif action == "delete_repository":
1898
  if not repo_name:
1899
  raise ValueError("Missing parameter: repo_name")
1900
  repo = user.get_repo(repo_name)
1901
  repo.delete()
1902
  return f"Repository **`{repo_name}`** deleted!"
1903
-
1904
  elif action == "update_repository_description":
1905
  if not all([repo_name, new_description]):
1906
  raise ValueError("Missing parameters: repo_name, new_description")
1907
  repo = user.get_repo(repo_name)
1908
  repo.edit(description=new_description)
1909
  return f"Repository **`{repo_name}`** description updated to: \"{new_description}\""
1910
-
1911
  elif action == "edit_issue":
1912
  if not all([repo_name, issue_number]):
1913
  raise ValueError("Missing parameters: repo_name, issue_number")
@@ -1925,7 +1817,6 @@ Po wykonaniu tych kroków, Twoja aplikacja Shadcn UI będzie w pełni skonfiguro
1925
  issue.edit(**issue_update_params)
1926
  updated_fields = ", ".join(issue_update_params.keys())
1927
  return f"Issue **#{issue_number}** in repository **`{repo_name}`** updated fields: {updated_fields}"
1928
-
1929
  elif action == "list_closed_issues":
1930
  if not repo_name:
1931
  raise ValueError("Missing parameter: repo_name")
@@ -1935,7 +1826,6 @@ Po wykonaniu tych kroków, Twoja aplikacja Shadcn UI będzie w pełni skonfiguro
1935
  return f"No closed issues in repository **`{repo_name}`**."
1936
  issues_list = "\n".join([f"- [{issue.title}]({issue.html_url})" for issue in issues])
1937
  return f"Closed issues in repository **`{repo_name}`**:\n{issues_list}"
1938
-
1939
  elif action == "get_issue_details":
1940
  if not all([repo_name, issue_number]):
1941
  raise ValueError("Missing parameters: repo_name, issue_number")
@@ -1963,12 +1853,9 @@ Author: {issue.user.login}
1963
  """
1964
  else:
1965
  details += "No comments."
1966
-
1967
  return details
1968
-
1969
  else:
1970
  raise ValueError(f"Unknown action: {action}")
1971
-
1972
  except GithubException as e:
1973
  return f"**GitHub Error:** {e}"
1974
  except ValueError as e:
@@ -1977,11 +1864,8 @@ Author: {issue.user.login}
1977
  return f"**Connection Error:** {e}"
1978
  except Exception as e:
1979
  return f"**Unexpected Error:** {e}"
1980
-
1981
-
1982
  with gr.Blocks() as demo:
1983
  gr.Markdown("# GitHub Tool Plugingit (Simplified Interface)")
1984
-
1985
  with gr.Column():
1986
  action = gr.Dropdown(
1987
  choices=[
@@ -2025,7 +1909,6 @@ with gr.Blocks() as demo:
2025
  value=param_details["default"] if "default" in param_details else ""
2026
  )
2027
  template_params_ui[template_key] = params_section
2028
-
2029
  branch = gr.Textbox(label="Branch", value="main")
2030
  path = gr.Textbox(label="File Path")
2031
  content = gr.Code(label="File Content", lines=5, language='python', visible=True)
@@ -2048,7 +1931,6 @@ with gr.Blocks() as demo:
2048
  issue_title = gr.Textbox(label="New Issue Title", visible=False)
2049
  issue_body = gr.Textbox(label="New Issue Body", visible=False, lines=3)
2050
  issue_state = gr.Dropdown(label="New Issue State (open/closed)", choices=["open", "closed", None], value=None, allow_none=True, visible=False)
2051
-
2052
  def show_template_params(template_name):
2053
  visibility_map = {key: gr.Column.update(visible=False) for key in PROJECT_TEMPLATES if
2054
  "params" in PROJECT_TEMPLATES[key]}
@@ -2056,7 +1938,6 @@ with gr.Blocks() as demo:
2056
  visibility_map[template_name] = gr.Column.update(visible=True)
2057
  return [visibility_map.get(key, gr.Column.update(visible=False)) for key in PROJECT_TEMPLATES if
2058
  "params" in PROJECT_TEMPLATES[key]]
2059
-
2060
  template_param_visibility_outputs = [template_params_ui[key] for key in PROJECT_TEMPLATES if
2061
  "params" in PROJECT_TEMPLATES[key]]
2062
  template_name.change(
@@ -2064,22 +1945,24 @@ with gr.Blocks() as demo:
2064
  inputs=[template_name],
2065
  outputs=template_param_visibility_outputs
2066
  )
2067
-
2068
  run_button = gr.Button("Execute")
2069
  output = gr.Markdown(label="Result")
2070
-
2071
  input_components = [
2072
  action, repo_name, branch, path, content, message, owner, vcs_url, title, body, base, head, issue_number,
2073
  labels, tag, release_name, file_url, repo_url, template_name, new_description, issue_title, issue_body,
2074
  issue_state, diff, diff_message
2075
  ]
2076
-
2077
  for template_key in PROJECT_TEMPLATES:
2078
  if "params" in PROJECT_TEMPLATES[template_key]:
2079
  for param_name in template_params_ui:
2080
- if param_name in PROJECT_TEMPLATES[template_key]["params"]:
2081
- input_components.append(template_params_ui[param_name])
 
 
 
2082
 
 
 
2083
  def show_hide_input_fields(action_name):
2084
  visibility_map = {
2085
  "repo_name": gr.Textbox.update(visible=False),
@@ -2107,7 +1990,6 @@ with gr.Blocks() as demo:
2107
  "issue_body": gr.Textbox.update(visible=False),
2108
  "issue_state": gr.Dropdown.update(visible=False),
2109
  }
2110
-
2111
  if action_name in ["import_repository"]:
2112
  visibility_map.update({"repo_name": gr.Textbox.update(visible=True), "owner": gr.Textbox.update(visible=True), "vcs_url": gr.Textbox.update(visible=True)})
2113
  elif action_name in ["create_repository", "delete_repository", "list_branches", "list_open_pull_requests", "list_issues", "list_closed_issues", "list_releases", "list_forks"]:
@@ -2150,28 +2032,21 @@ with gr.Blocks() as demo:
2150
  visibility_map.update({"repo_url": gr.Textbox.update(visible=True)})
2151
  elif action_name == "update_repository_description":
2152
  visibility_map.update({"repo_name": gr.Textbox.update(visible=True), "new_description": gr.Textbox.update(visible=True)})
2153
-
2154
-
2155
  return [visibility_map.get(key, gr.Textbox.update(visible=False)) for key in visibility_map]
2156
-
2157
  output_components_visibility = [
2158
  repo_name, branch, path, content, message, owner, vcs_url, title, body, base, head, issue_number, labels,
2159
  tag, release_name, file_url, repo_url, template_name, new_description, issue_title, issue_body,
2160
  issue_state, diff, diff_message
2161
  ]
2162
-
2163
  action.change(
2164
  show_hide_input_fields,
2165
  inputs=[action],
2166
  outputs=output_components_visibility
2167
  )
2168
-
2169
-
2170
  run_button.click(
2171
  github_tool,
2172
  inputs=input_components,
2173
  outputs=output,
2174
  api_name="github_tool"
2175
  )
2176
-
2177
  demo.launch()
 
28
  "app.py": """from flask import Flask
29
  from flask_sqlalchemy import SQLAlchemy
30
  import os
 
31
  basedir = os.path.abspath(os.path.dirname(__file__))
 
32
  app = Flask(__name__)
33
  app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get('DATABASE_URL') or \\
34
  '{{database_uri}}' # Placeholder for database URI
35
  app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
 
36
  db = SQLAlchemy(app)
 
37
  class HelloWorld(db.Model):
38
  id = db.Column(db.Integer, primary_key=True)
39
  message = db.Column(db.String(128))
 
40
  def __repr__(self):
41
  return f'<HelloWorld {self.message}>'
 
42
  @app.route('/')
43
  def hello():
44
  return "Hello, Flask!"
 
45
  @app.route('/db_test')
46
  def db_test():
47
  try:
 
49
  return "Database connection successful!"
50
  except Exception as e:
51
  return f"Database connection failed: {e}"
 
 
52
  if __name__ == '__main__':
53
  with app.app_context(): # Create application context for DB operations
54
  db.create_all()
 
139
  "manage.py": """#!/usr/bin/env python
140
  import os
141
  import sys
 
142
  if __name__ == "__main__":
143
  os.environ.setdefault("DJANGO_SETTINGS_MODULE", "myapp.settings")
144
  try:
 
211
  "myapp/urls.py": """from django.contrib import admin
212
  from django.urls import path
213
  from django.http import HttpResponse
 
214
  def home(request):
215
  return HttpResponse("Hello, Django!")
 
216
  urlpatterns = [
217
  path('admin/', admin.site.urls),
218
  path('', home, name='home'),
 
231
  "server.js": """const express = require('express')
232
  const app = express()
233
  const port = 3000
 
234
  app.get('/', (req, res) => {
235
  res.send('Hello World from Express!')
236
  })
 
237
  app.listen(port, () => {
238
  console.log(`Server listening on port ${port}`)
239
  })""",
 
276
  "files": {
277
  "main.py": """def main():
278
  print("Hello from Python script!")
 
279
  if __name__ == "__main__":
280
  main()""",
281
  "requirements.txt": "",
 
327
  }""",
328
  "vite.config.js": """import { defineConfig } from 'vite'
329
  import react from '@vitejs/plugin-react'
330
+ # https://vitejs.dev/config/
 
331
  export default defineConfig({
332
  plugins: [react()],
333
  })""",
 
348
  import ReactDOM from 'react-dom/client'
349
  import App from './App.jsx'
350
  import './index.css'
 
351
  ReactDOM.createRoot(document.getElementById('root')).render(
352
  <React.StrictMode>
353
  <App />
 
356
  "src/App.jsx": """import React from 'react'
357
  import { Button } from "./components/ui/button"
358
  import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "./components/ui/card"
 
 
359
  function App() {
360
  return (
361
  <div className="container mx-auto py-10">
362
  <h1 className="text-3xl font-bold text-center mb-5">
363
  Witaj w aplikacji Shadcn UI!
364
  </h1>
 
365
  <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
366
  <Card>
367
  <CardHeader>
 
373
  <Button className="mt-4">Przycisk Akcji</Button>
374
  </CardContent>
375
  </Card>
 
376
  <Card>
377
  <CardHeader>
378
  <CardTitle>Karta 2</CardTitle>
 
383
  <Button variant="secondary" className="mt-4">Przycisk Wtórny</Button>
384
  </CardContent>
385
  </Card>
 
386
  <Card className="lg:col-span-1 md:col-span-2">
387
  <CardHeader>
388
  <CardTitle>Dłuższa Karta</CardTitle>
 
401
  </div>
402
  )
403
  }
 
404
  export default App""",
405
  "src/index.css": """@tailwind base;
406
  @tailwind components;
407
  @tailwind utilities;
 
408
  @layer base {
409
  :root {
410
  --background: 0 0% 100%;
411
  --foreground: 222.2 84.9% 4.9%;
 
412
  --card: 0 0% 100%;
413
  --card-foreground: 222.2 84.9% 4.9%;
 
414
  --popover: 0 0% 100%;
415
  --popover-foreground: 222.2 84.9% 4.9%;
 
416
  --primary: 221.2 83.2% 53.3%;
417
  --primary-foreground: 210 40% 98%;
 
418
  --secondary: 210 40% 96.1%;
419
  --secondary-foreground: 222.2 47.4% 11.2%;
 
420
  --muted: 210 40% 96.1%;
421
  --muted-foreground: 215.4 16.3% 46.9%;
 
422
  --accent: 210 40% 96.1%;
423
  --accent-foreground: 222.2 47.4% 11.2%;
 
424
  --destructive: 0 84.2% 60.2%;
425
  --destructive-foreground: 210 40% 98%;
 
426
  --border: 214.3 31.8% 91.4%;
427
  --input: 214.3 31.8% 91.4%;
428
  --ring: 221.2 83.2% 53.3%;
 
429
  --radius: 0.5rem;
430
  }
 
431
  .dark {
432
  --background: 222.2 84.9% 4.9%;
433
  --foreground: 210 40% 98%;
 
434
  --card: 222.2 84.9% 4.9%;
435
  --card-foreground: 210 40% 98%;
 
436
  --popover: 222.2 84.9% 4.9%;
437
  --popover-foreground: 210 40% 98%;
 
438
  --primary: 217.2 91.2% 59.8%;
439
  --primary-foreground: 222.2 47.4% 11.2%;
 
440
  --secondary: 217.2 32.6% 17.5%;
441
  --secondary-foreground: 210 40% 98%;
 
442
  --muted: 217.2 32.6% 17.5%;
443
  --muted-foreground: 215 20.2% 65.1%;
 
444
  --accent: 217.2 32.6% 17.5%;
445
  --accent-foreground: 210 40% 98%;
 
446
  --destructive: 0 62.8% 30.6%;
447
  --destructive-foreground: 210 40% 98%;
 
448
  --border: 217.2 32.6% 17.5%;
449
  --input: 217.2 32.6% 17.5%;
450
  --ring: 224.9 98.6% 67.3%;
451
  }
452
  }
 
453
  @layer components {
454
  .container {
455
  @apply max-w-7xl mx-auto px-4 sm:px-6 lg:px-8;
 
543
  import { cn } from "@/lib/utils"
544
  import { Slot } from "@radix-ui/react-slot"
545
  import { cva } from "class-variance-authority";
 
546
  const buttonVariants = cva(
547
  "inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
548
  {
 
571
  },
572
  }
573
  )
 
574
  const Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
575
  const Comp = asChild ? Slot : "button"
576
  return (<Comp
 
578
  ref={ref} {...props} />)
579
  })
580
  Button.displayName = "Button"
 
581
  export { Button, buttonVariants }""",
582
  "src/components/ui/card.jsx": """import * as React from "react"
583
  import { cn } from "@/lib/utils"
 
584
  const Card = React.forwardRef(({ className, ...props }, ref) => (<div
585
  className={cn("rounded-lg border bg-card text-card-foreground shadow-sm", className)}
586
  ref={ref}
587
  {...props} />))
588
  Card.displayName = "Card"
 
589
  const CardHeader = React.forwardRef(({ className, ...props }, ref) => (<div
590
  className={cn("flex flex-col space-y-1.5 p-6", className)}
591
  ref={ref}
592
  {...props} />))
593
  CardHeader.displayName = "CardHeader"
 
594
  const CardTitle = React.forwardRef(({ className, ...props }, ref) => (<h3
595
  className={cn("text-lg font-semibold leading-none tracking-tight", className)}
596
  ref={ref}
597
  {...props} />))
598
  CardTitle.displayName = "CardTitle"
 
599
  const CardDescription = React.forwardRef(({ className, ...props }, ref) => (<p
600
  className={cn("text-sm text-muted-foreground", className)}
601
  ref={ref}
602
  {...props} />))
603
  CardDescription.displayName = "CardDescription"
 
604
  const CardContent = React.forwardRef(({ className, ...props }, ref) => (<div
605
  className={cn("p-6 pt-0", className)}
606
  ref={ref}
607
  {...props} />))
608
  CardContent.displayName = "CardContent"
 
609
  const CardFooter = React.forwardRef(({ className, ...props }, ref) => (<div
610
  className={cn("flex items-center p-6 pt-0", className)}
611
  ref={ref}
612
  {...props} />))
613
  CardFooter.displayName = "CardFooter" "node_modules/colorette": {
614
  "version": "2.0.20",
615
+ # "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz",
616
+ # "integrity": "sha512",
617
+ },
618
  "fastapi": {
619
  "files": {
620
  "main.py": """from fastapi import FastAPI
621
 
622
  app = FastAPI()
623
 
624
+ @app.get("/")
625
+ async def read_root():
626
+ return {"Hello": "World from FastAPI"}
627
+ """,
628
+ "requirements.txt": "fastapi\nuvicorn",
629
+ ".gitignore": "__pycache__/\nvenv/\n"
630
+ }
 
 
631
  },
632
  "nextjs": {
633
  "files": {
 
694
  </div>
695
  )
696
  }""",
697
+ "styles/Home.module.css": """.container {
698
  min-height: 100vh;
699
  padding: 0 0.5rem;
700
  display: flex;
 
815
  },
816
  "node_modules/@babel/code-frame": {
817
  "version": "7.23.5",
818
+ #"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz",
819
+ #"integrity": "sha512-...",
820
  "dependencies": {
821
  "@babel/highlight": "^7.22.16"
822
  },
 
826
  },
827
  "node_modules/@babel/highlight": {
828
  "version": "7.23.4",
829
+ #"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz",
830
+ #"integrity": "sha512-...",
831
  "dependencies": {
832
  "chalk": "^2.0.0",
833
  "esutils": "^2.0.0"
 
838
  },
839
  "node_modules/@cnakazawa/describe-type": {
840
  "version": "2.1.1",
841
+ #"resolved": "https://registry.npmjs.org/@cnakazawa/describe-type/-/describe-type-2.1.1.tgz",
842
+ #"integrity": "sha512-...",
843
  },
844
  "node_modules/@eslint/eslintrc": {
845
  "version": "2.1.1",
846
+ #"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.1.tgz",
847
+ #"integrity": "sha512-...",
848
  "dependencies": {
849
  "ajv": "^6.12.2",
850
  "chalk": "^2.0.0",
 
862
  },
863
  "node_modules/@eslint/js": {
864
  "version": "8.52.0",
865
+ #"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.52.0.tgz",
866
+ #"integrity": "sha512-...",
867
  "engines": {
868
  "node": "^10.0.0 || >= 12.0.0"
869
  }
870
  },
871
  "node_modules/@humanwhocodes/config-array": {
872
  "version": "0.11.12",
873
+ # "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.12.tgz",
874
+ #"integrity": "sha512-...",
875
  "dependencies": {
876
  "@humanwhocodes/object-schema": "^1.2.1",
877
  "debug": "^4.3.4",
 
883
  },
884
  "node_modules/@humanwhocodes/object-schema": {
885
  "version": "1.2.1",
886
+ #"resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz",
887
+ #"integrity": "sha512-...",
888
  "engines": {
889
  "node": ">=12"
890
  }
891
  },
892
  "node_modules/@jest/types": {
893
  "version": "29.6.3",
894
+ #"resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz",
895
+ #"integrity": "sha512-...",
896
  "dependencies": {
897
  "@types/jest": "*",
898
  "@types/node": "*",
 
901
  },
902
  "node_modules/@next/env": {
903
  "version": "14.0.0",
904
+ #"resolved": "https://registry.npmjs.org/@next/env/-/env-14.0.0.tgz",
905
+ #"integrity": "sha512-...",
906
  },
907
  "node_modules/@npmcli/ci-detect": {
908
  "version": "2.0.1",
909
+ #"resolved": "https://registry.npmjs.org/@npmcli/ci-detect/-/ci-detect-2.0.1.tgz",
910
+ #"integrity": "sha512-...",
911
  },
912
  "node_modules/@radix-ui/react-slot": {
913
+ "version": "1.0.2",
914
+ #"resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.2.tgz",
915
+ #"integrity": "sha512-...",
916
  },
917
  "node_modules/@radix-ui/slot": {
918
  "version": "1.0.2",
919
+ #"resolved": "https://registry.npmjs.org/@radix-ui/slot/-/slot-1.0.2.tgz",
920
+ #"integrity": "sha512-...",
921
  "peerDependencies": {
922
  "react": "*"
923
  }
924
  },
925
  "node_modules/@rollup/plugin-commonjs": {
926
  "version": "25.0.7",
927
+ #"resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.7.tgz",
928
+ #"integrity": "sha512-...",
929
  "peerDependencies": {
930
  "rollup": "^1.20.0||^2||^3"
931
  },
 
937
  },
938
  "node_modules/@rollup/plugin-inject": {
939
  "version": "5.1.0",
940
+ #"resolved": "https://registry.npmjs.org/@rollup/plugin-inject/-/plugin-inject-5.1.0.tgz",
941
+ #"integrity": "sha512-...",
942
  "peerDependencies": {
943
  "rollup": "^1.20.0||^2||^3"
944
  },
 
950
  },
951
  "node_modules/@stylistic/eslint-plugin-js": {
952
  "version": "1.5.1",
953
+ #"resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-js/-/eslint-plugin-js-1.5.1.tgz",
954
+ #"integrity": "sha512-...",
955
  "dependencies": {
956
  "@stylistic/eslint-plugin-plus": "1.5.1",
957
  "globals": "^13.20.0"
 
962
  },
963
  "node_modules/@stylistic/eslint-plugin-plus": {
964
  "version": "1.5.1",
965
+ #"resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-plus/-/eslint-plugin-plus-1.5.1.tgz",
966
+ #"integrity": "sha512-...",
967
  "peerDependencies": {
968
  "eslint": ">=8.0.0"
969
  }
970
  },
971
+ "node_modules/@stylistic/js": {
972
+ "version": "1.5.1",
973
+ #"resolved": "https://registry.npmjs.org/@stylistic/js/-/js-1.5.1.tgz",
974
+ #"integrity": "sha512-...",
975
+ "engines": {
976
+ "node": ">=14.0.0"
977
+ }
978
  },
979
  "node_modules/@svgr/plugin-jsx": {
980
  "version": "8.1.4",
981
+ #"resolved": "https://registry.npmjs.org/@svgr/plugin-jsx/-/plugin-jsx-8.1.4.tgz",
982
+ #"integrity": "sha512-...",
983
  "dependencies": {
984
  "@babel/plugin-syntax-jsx": "^7.18.6",
985
  "@svgr/babel-preset": "8.1.4",
 
995
  },
996
  "node_modules/@tsconfig/cypress": {
997
  "version": "3.0.0",
998
+ #"resolved": "https://registry.npmjs.org/@tsconfig/cypress/-/cypress-3.0.0.tgz",
999
+ #"integrity": "sha512-...",
1000
  "peerDependencies": {
1001
  "typescript": ">=4.5"
1002
  }
1003
  },
1004
  "node_modules/@tsconfig/create-react-app": {
1005
  "version": "2.0.1",
1006
+ #"resolved": "https://registry.npmjs.org/@tsconfig/create-react-app/-/create-react-app-2.0.1.tgz",
1007
+ #"integrity": "sha512-...",
1008
  "peerDependencies": {
1009
  "typescript": ">=3.8"
1010
  }
1011
  },
1012
  "node_modules/@tsconfig/node-lts-strictest": {
1013
  "version": "20.1.1",
1014
+ #"resolved": "https://registry.npmjs.org/@tsconfig/node-lts-strictest/-/node-lts-strictest-20.1.1.tgz",
1015
+ #"integrity": "sha512-...",
1016
  "peerDependencies": {
1017
  "typescript": ">=4.8"
1018
  }
1019
  },
1020
  "node_modules/@types/babel__core": {
1021
  "version": "7.20.3",
1022
+ #"resolved": "https://registry.npmjs.org/@types/babel__core/-/core-7.20.3.tgz",
1023
+ #"integrity": "sha512-...",
1024
  "dependencies": {
1025
  "@babel/parser": "*",
1026
  "@types/babel__generator": "*",
 
1031
  },
1032
  "node_modules/@types/babel__generator": {
1033
  "version": "7.6.8",
1034
+ #"resolved": "https://registry.npmjs.org/@types/babel__generator/-/generator-7.6.8.tgz",
1035
+ #"integrity": "sha512-...",
1036
  },
1037
  "node_modules/@types/babel__template": {
1038
  "version": "7.4.5",
1039
+ #"resolved": "https://registry.npmjs.org/@types/babel__template/-/template-7.4.5.tgz",
1040
+ #"integrity": "sha512-...",
1041
  },
1042
  "node_modules/@types/babel__traverse": {
1043
  "version": "7.20.5",
1044
+ #"resolved": "https://registry.npmjs.org/@types/babel__traverse/-/traverse-7.20.5.tgz",
1045
+ #"integrity": "sha512-...",
1046
  "dependencies": {
1047
  "@types/babel__parser": "*"
1048
  }
1049
  },
1050
  "node_modules/@types/chalk": {
1051
  "version": "2.2.0",
1052
+ #"resolved": "https://registry.npmjs.org/@types/chalk/-/chalk-2.2.0.tgz",
1053
+ #"integrity": "sha512-...",
1054
  },
1055
  "node_modules/@types/color-name": {
1056
  "version": "1.1.3",
1057
+ #"resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.3.tgz",
1058
+ #"integrity": "sha512-...",
1059
  },
1060
  "node_modules/@types/eslint": {
1061
  "version": "8.44.7",
1062
+ #"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.7.tgz",
1063
+ #"integrity": "sha512-...",
1064
  "dependencies": {
1065
  "@jest/types": "*",
1066
  "@types/estree": "*",
 
1070
  },
1071
  "node_modules/@types/estree": {
1072
  "version": "2.0.0",
1073
+ #"resolved": "https://registry.npmjs.org/@types/estree/-/estree-2.0.0.tgz",
1074
+ #"integrity": "sha512-...",
1075
  },
1076
  "node_modules/@types/glob": {
1077
  "version": "8.1.0",
1078
+ #"resolved": "https://registry.npmjs.org/@types/glob/-/glob-8.1.0.tgz",
1079
+ #"integrity": "sha512-...",
1080
  "dependencies": {
1081
  "@types/node": "*"
1082
  }
1083
  },
1084
  "node_modules/@types/hoist-non-react-statics": {
1085
  "version": "3.3.1",
1086
+ #"resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz",
1087
+ #"integrity": "sha512-...",
1088
  },
1089
  "node_modules/@types/jest": {
1090
  "version": "29.5.5",
1091
+ #"resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.5.tgz",
1092
+ #"integrity": "sha512-...",
1093
  "dependencies": {
1094
  "@types/estree": "*",
1095
  "@types/node": "*",
 
1101
  },
1102
  "node_modules/@types/json-schema": {
1103
  "version": "7.0.12",
1104
+ #"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz",
1105
+ #"integrity": "sha512-...",
1106
  },
1107
  "node_modules/@types/json5": {
1108
  "version": "0.0.2",
1109
+ #"resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.2.tgz",
1110
+ #"integrity": "sha512-...",
1111
  },
1112
  "node_modules/@types/minimatch": {
1113
  "version": "5.1.0",
1114
+ #"resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.0.tgz",
1115
+ #"integrity": "sha512-...",
1116
  },
1117
  "node_modules/@types/node": {
1118
  "version": "20.8.9",
1119
+ #"resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.9.tgz",
1120
+ #"integrity": "sha512-...",
1121
  },
1122
  "node_modules/@types/parse-json": {
1123
  "version": "4.0.0",
1124
+ #"resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz",
1125
+ #"integrity": "sha512-...",
1126
  },
1127
  "node_modules/@types/prettier": {
1128
  "version": "2.7.3",
1129
+ #"resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz",
1130
+ #"integrity": "sha512-...",
1131
  },
1132
  "node_modules/@types/promises-aplus": {
1133
  "version": "2.0.5",
1134
+ #"resolved": "https://registry.npmjs.org/@types/promises-aplus/-/promises-aplus-2.0.5.tgz",
1135
+ #"integrity": "sha512-...",
1136
  "dependencies": {
1137
  "@types/node": "*"
1138
  }
1139
  },
1140
  "node_modules/@types/react": {
1141
  "version": "18.2.33",
1142
+ #"resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.33.tgz",
1143
+ #"integrity": "sha512-...",
1144
  "dependencies": {
1145
  "@types/prop-types": "*",
1146
  "@types/scheduler": "*",
 
1149
  },
1150
  "node_modules/@types/react-dom": {
1151
  "version": "18.2.14",
1152
+ #"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.14.tgz",
1153
+ #"integrity": "sha512-...",
1154
  "dependencies": {
1155
  "@types/react": "*"
1156
  }
1157
  },
1158
  "node_modules/@types/resolve": {
1159
  "version": "1.20.2",
1160
+ #"resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz",
1161
+ #"integrity": "sha512-...",
1162
  },
1163
  "node_modules/@types/scheduler": {
1164
  "version": "0.16.4",
1165
+ #"resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.4.tgz",
1166
+ #"integrity": "sha512-...",
1167
  },
1168
  "node_modules/@types/semver": {
1169
  "version": "7.5.3",
1170
+ #"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.3.tgz",
1171
+ #"integrity": "sha512-...",
1172
  },
1173
  "node_modules/@types/stack-trace-parser": {
1174
  "version": "1.3.2",
1175
+ #"resolved": "https://registry.npmjs.org/@types/stack-trace-parser/-/stack-trace-parser-1.3.2.tgz",
1176
+ #"integrity": "sha512-...",
1177
  },
1178
  "node_modules/@types/testing-library__dom": {
1179
  "version": "7.5.0",
1180
+ #"resolved": "https://registry.npmjs.org/@types/testing-library__dom/-/dom-7.5.0.tgz",
1181
+ #"integrity": "sha512-...",
1182
  "dependencies": {
1183
  "@types/node": "*"
1184
  }
1185
  },
1186
  "node_modules/@types/ungap__structured-clone": {
1187
  "version": "0.3.0",
1188
+ #"resolved": "https://registry.npmjs.org/@types/ungap__structured-clone/-/structured-clone-0.3.0.tgz",
1189
+ #"integrity": "sha512-...",
1190
  },
1191
  "node_modules/@vercel/nft": {
1192
  "version": "0.25.0",
1193
+ #"resolved": "https://registry.npmjs.org/@vercel/nft/-/nft-0.25.0.tgz",
1194
+ #"integrity": "sha512-...",
1195
  "dependencies": {
1196
  "@types/glob": "^8.0.0",
1197
  "cacache": "^16.1.0",
 
1208
  },
1209
  "node_modules/ajv": {
1210
  "version": "6.12.6",
1211
+ #"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
1212
+ #"integrity": "sha512-...",
1213
  "dependencies": {
1214
  "fast-deep-equal": "^3.1.1",
1215
  "json-schema-traverse": "^0.4.1",
 
1221
  },
1222
  "node_modules/ansi-styles": {
1223
  "version": "3.2.1",
1224
+ #"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
1225
+ #"integrity": "sha512-...",
1226
  "dependencies": {
1227
  "color-convert": "^1.9.0"
1228
  },
 
1232
  },
1233
  "node_modules/arg": {
1234
  "version": "5.0.2",
1235
+ #"resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz",
1236
+ #"integrity": "sha512-...",
1237
  "engines": {
1238
  "node": ">=14"
1239
  }
1240
  },
1241
  "node_modules/assert": {
1242
  "version": "1.5.0",
1243
+ #"resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz",
1244
+ #"integrity": "sha512-...",
1245
  "dependencies": {
1246
  "ieee754": "^1.1.13",
1247
  "util": "0.10.4"
 
1249
  },
1250
  "node_modules/autoprefixer": {
1251
  "version": "10.4.16",
1252
+ #"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.16.tgz",
1253
+ #"integrity": "sha512-...",
1254
  "dependencies": {
1255
  "browserslist": "^4.22.1",
1256
  "caniuse-lite": "1.0.30015751",
 
1270
  },
1271
  "node_modules/balanced-match": {
1272
  "version": "1.0.2",
1273
+ #"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
1274
+ #"integrity": "sha512-...",
1275
  },
1276
  "node_modules/browserslist": {
1277
  "version": "4.22.2",
1278
+ #"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz",
1279
+ #"integrity": "sha512-...",
1280
  "funding": {
1281
  "type": "opencollective",
1282
  "url": "https://opencollective.com/browserslist"
 
1287
  },
1288
  "node_modules/cacache": {
1289
  "version": "16.1.1",
1290
+ #"resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.1.tgz",
1291
+ #"integrity": "sha512-...",
1292
  "dependencies": {
1293
  "@npmcli/ci-detect": "^2.0.0",
1294
  "@npmcli/fs": "^3.1.0",
 
1312
  },
1313
  "node_modules/camelcase": {
1314
  "version": "6.3.0",
1315
+ #"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",
1316
+ #"integrity": "sha512-...",
1317
  "engines": {
1318
  "node": ">=10"
1319
  }
1320
  },
1321
  "node_modules/caniuse-lite": {
1322
  "version": "1.0.30015751",
1323
+ #"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30015751.tgz",
1324
+ #"integrity": "sha512-...",
1325
+ },
1326
+ "node_modules/chalk": {
1327
+ "version": "2.4.2",
1328
+ #"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
1329
+ #"integrity": "sha512-...",
1330
  "dependencies": {
1331
  "ansi-styles": "^3.2.1",
1332
  "escape-string-regexp": "^1.0.5",
 
1338
  },
1339
  "node_modules/chokidar": {
1340
  "version": "3.5.3",
1341
+ #"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
1342
+ #"integrity": "sha512-...",
1343
  "dependencies": {
1344
  "anymatch": "~3.1.3",
1345
  "braces": "~3.0.2",
 
1358
  },
1359
  "node_modules/chownr": {
1360
  "version": "3.0.0",
1361
+ #"resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz",
1362
+ #"integrity": "sha512-...",
1363
  "engines": {
1364
  "node": ">=12"
1365
  }
1366
  },
1367
  "node_modules/class-variance-authority": {
1368
  "version": "0.7.0",
1369
+ #"resolved": "https://registry.npmjs.org/class-variance-authority/-/class-variance-authority-0.7.0.tgz",
1370
+ #"integrity": "sha512-...",
1371
  },
1372
  "node_modules/cli-boxes": {
1373
  "version": "2.2.1",
1374
+ #"resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz",
1375
+ #"integrity": "sha512-...",
1376
  "engines": {
1377
  "node": ">=12"
1378
  }
1379
  },
1380
  "node_modules/clsx": {
1381
  "version": "2.1.0",
1382
+ #"resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.0.tgz",
1383
+ #"integrity": "sha512-...",
1384
  },
1385
  "node_modules/color-convert": {
1386
  "version": "1.9.3",
1387
+ #"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
1388
+ #"integrity": "sha512-...",
1389
  "dependencies": {
1390
  "color-name": "1.1.3"
1391
  },
 
1395
  },
1396
  "node_modules/color-name": {
1397
  "version": "1.1.3",
1398
+ #"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
1399
+ #"integrity": "sha512-...",
1400
  "engines": {
1401
  "node": ">=0.1.90"
1402
  }
1403
  },
 
 
 
1404
 
1405
+
1406
+ export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }""",
1407
+ "src/lib/utils.js": """import { clsx } from "clsx"
1408
+ import { twMerge } from "tailwind-merge"
1409
 
1410
+ export function cn(...inputs) {
1411
+ return twMerge(clsx(inputs))
1412
+ }"""
1413
+ },
1414
+ "post_process": "shadcn_setup"
 
 
1415
  },
1416
  }
 
1417
  def get_file_content(owner, repo_name, path, branch="main"):
1418
  """Fetches file content from a GitHub repository."""
1419
  url = f"https://raw.githubusercontent.com/{owner}/{repo_name}/{branch}/{path}"
 
1423
  return response.text
1424
  except requests.exceptions.RequestException as e:
1425
  return f"Error fetching file: {e}"
 
 
1426
  def extract_repo_info(url):
1427
  """Extracts owner and repo name from a GitHub URL."""
1428
  match = re.search(r"github\.com/([^/]+)/([^/]+)", url)
1429
  return match.group(1), match.group(2) if match else (None, None)
 
 
1430
  def analyze_file_content(content, file_path):
1431
  """Analyzes file content and returns statistics."""
1432
  lines = content.splitlines()
 
1438
  "word_count": word_count,
1439
  "file_extension": file_extension,
1440
  }
 
 
1441
  def github_tool(
1442
  action: str,
1443
  repo_name: str = None,
 
1469
  ):
1470
  """Manages GitHub repositories."""
1471
  user = g.get_user()
 
1472
  try:
1473
  if action == "import_repository":
1474
  if not all([owner, repo_name, vcs_url]):
 
1478
  return "Repository already exists."
1479
  except GithubException:
1480
  pass
 
1481
  headers = {
1482
  'Authorization': f'token {GITHUB_TOKEN}',
1483
  'Accept': 'application/vnd.github.v3+json',
 
1486
  response = requests.put(import_url, json={'vcs_url': vcs_url, 'vcs': 'git'}, headers=headers)
1487
  response.raise_for_status()
1488
  return "Repository import started."
 
1489
  elif action == "create_repository":
1490
  if not repo_name:
1491
  raise ValueError("Missing parameter: repo_name")
1492
  repo = user.create_repo(name=repo_name)
1493
  return f"Repository **{repo_name}** created! [Open repository]({repo.html_url})"
 
1494
  elif action == "create_project_from_template":
1495
  if not all([repo_name, template_name]):
1496
  raise ValueError("Missing parameters: repo_name, template_name")
 
1500
  )
1501
  repo = user.create_repo(name=repo_name)
1502
  template = PROJECT_TEMPLATES[template_name]
 
1503
  template_params_final = {}
1504
  if "params" in template:
1505
  for param_name, param_config in template["params"].items():
1506
  template_params_final[param_name] = template_params.get(param_name, param_config.get("default")) if template_params else param_config.get("default")
 
1507
  repo_name_snake_case = repo_name.replace("-", "_")
1508
  readme_filename = "README.md"
 
1509
  env = jinja2.Environment()
 
1510
  for file_path, file_content in template["files"].items():
1511
  final_file_path = file_path
1512
  final_file_content = file_content
 
1513
  if "rename_files" in template:
1514
  for old_name, new_name_template in template["rename_files"].items():
1515
  if file_path == old_name:
1516
  final_file_path = new_name_template.replace("{{repo_name_snake_case}}", repo_name_snake_case).replace("{{repo_name}}", repo_name).replace("{{readme_filename}}", readme_filename)
 
1517
  template_render = env.from_string(final_file_content)
1518
  final_file_content = template_render.render(
1519
  repo_name=repo_name,
 
1521
  readme_filename=readme_filename,
1522
  **template_params_final
1523
  )
 
1524
  repo.create_file(
1525
  final_file_path,
1526
  f"Create {final_file_path} from template {template_name}",
1527
  final_file_content,
1528
  branch="main",
1529
  )
 
1530
  if "post_process" in template:
1531
  post_process_action = template["post_process"]
1532
  if post_process_action == "install_dependencies":
 
1547
  return f"Repository **{repo_name}** created from template **{template_name}**! [Open repository]({repo.html_url})\n\n{instructions}"
1548
  else:
1549
  print(f"Unknown post-process action: {post_process_action}")
 
1550
  return f"Repository **{repo_name}** created from template **{template_name}**! [Open repository]({repo.html_url})"
 
1551
  elif action == "create_file":
1552
  if not all([repo_name, path, content, message]):
1553
  raise ValueError("Missing parameters: repo_name, path, content, message")
1554
  repo = user.get_repo(repo_name)
1555
  repo.create_file(path, message, content, branch=branch)
1556
  return f"File **`{path}`** created in repository **`{repo_name}`** on branch **`{branch}`**."
 
1557
  elif action == "get_file":
1558
  if not all([repo_name, path]):
1559
  raise ValueError("Missing parameters: repo_name, path")
 
1562
  return (
1563
  f"File content of **`{path}`** from **`{repo_name}`**:\n\n`\n{file_content.decoded_content.decode()}\n`"
1564
  )
 
1565
  elif action == "get_file_content_by_url":
1566
  if not file_url:
1567
  raise ValueError("Missing parameter: file_url")
1568
  file_content = get_file_content(None, None, None, None)
1569
  return f"File content from URL **`{file_url}`**:\n\n`\n{file_content}\n`"
 
1570
  elif action == "delete_file":
1571
  if not all([repo_name, path]):
1572
  raise ValueError("Missing parameters: repo_name, path")
 
1574
  file_contents = repo.get_contents(path, ref=branch)
1575
  repo.delete_file(path, "Delete file", file_contents.sha, branch=branch)
1576
  return f"File **`{path}`** deleted from repository **`{repo_name}`** on branch **`{branch}`**."
 
1577
  elif action == "update_file":
1578
  if not all([repo_name, path, content, message]):
1579
  raise ValueError("Missing parameters: repo_name, path, content, message")
 
1581
  file_contents = repo.get_contents(path, ref=branch)
1582
  repo.update_file(path, message, content, file_contents.sha, branch=branch)
1583
  return f"File **`{path}`** updated in repository **`{repo_name}`** on branch **`{branch}`**."
 
1584
  elif action == "update_file_diff":
1585
  if not all([repo_name, path, diff, diff_message]):
1586
  raise ValueError("Missing parameters: repo_name, path, diff, diff_message")
1587
  repo = user.get_repo(repo_name)
1588
  file_contents = repo.get_contents(path, ref=branch)
1589
  current_content_text = file_contents.decoded_content.decode()
 
1590
  dmp = diff_match_patch()
 
1591
  try:
1592
  patches = dmp.patch_fromText(diff)
1593
  except ValueError:
1594
  raise ValueError("Invalid patch format. Please provide a valid patch in 'diff' format.")
 
1595
  patched_content_tuple = dmp.patch_apply(patches, current_content_text)
1596
  patched_content_text = patched_content_tuple[0]
1597
  patch_results = patched_content_tuple[1]
 
1598
  if not any(patch_results):
1599
  raise ValueError("Failed to apply patch. Diff might be outdated or invalid.")
 
1600
  repo.update_file(path, diff_message, patched_content_text, file_contents.sha, branch=branch)
1601
  return f"File **`{path}`** updated using diff in repository **`{repo_name}`** on branch **`{branch}`**."
 
 
1602
  elif action == "list_branches":
1603
  if not repo_name:
1604
  raise ValueError("Missing parameter: repo_name")
 
1606
  branches = repo.get_branches()
1607
  branch_list = "\n".join([f"- `{branch.name}`" for branch in branches])
1608
  return f"Branches in repository **`{repo_name}`**:\n{branch_list}"
 
1609
  elif action == "create_branch":
1610
  if not all([repo_name, base, head]):
1611
  raise ValueError("Missing parameters: repo_name, base, head")
 
1613
  source_branch = repo.get_branch(base)
1614
  repo.create_git_ref(ref=f"refs/heads/{head}", sha=source_branch.commit.sha)
1615
  return f"Branch **`{head}`** created from **`{base}`** in repository **`{repo_name}`**."
 
1616
  elif action == "delete_branch":
1617
  if not all([repo_name, branch]):
1618
  raise ValueError("Missing parameters: repo_name, branch")
1619
  repo = user.get_repo(repo_name)
1620
  repo.get_git_ref(f"heads/{branch}").delete()
1621
  return f"Branch **`{branch}`** deleted from repository **`{repo_name}`**."
 
1622
  elif action == "create_pull_request":
1623
  if not all([repo_name, title, body, base, head]):
1624
  raise ValueError("Missing parameters: repo_name, title, body, base, head")
1625
  repo = user.get_repo(repo_name)
1626
  pr = repo.create_pull(title=title, body=body, base=base, head=head)
1627
  return f"Pull request created! [Open Pull Request]({pr.html_url})"
 
1628
  elif action == "list_open_pull_requests":
1629
  if not repo_name:
1630
  raise ValueError("Missing parameter: repo_name")
 
1634
  return f"No open pull requests in repository **`{repo_name}`**."
1635
  prs_list = "\n".join([f"- [{pr.title}]({pr.html_url})" for pr in open_prs])
1636
  return f"Open pull requests in repository **`{repo_name}`**:\n{prs_list}"
 
1637
  elif action == "create_issue":
1638
  if not all([repo_name, title, body]):
1639
  raise ValueError("Missing parameters: repo_name, title, body")
1640
  repo = user.get_repo(repo_name)
1641
  issue = repo.create_issue(title=title, body=body)
1642
  return f"Issue created! [Open Issue]({issue.html_url})"
 
1643
  elif action == "list_issues":
1644
  if not repo_name:
1645
  raise ValueError("Missing parameter: repo_name")
 
1649
  return f"No open issues in repository **`{repo_name}`**."
1650
  issues_list = "\n".join([f"- [{issue.title}]({issue.html_url})" for issue in issues])
1651
  return f"Open issues in repository **`{repo_name}`**:\n{issues_list}"
 
1652
  elif action == "add_label_to_issue":
1653
  if not all([repo_name, issue_number, labels]):
1654
  raise ValueError("Missing parameters: repo_name, issue_number, labels")
 
1659
  return (
1660
  f"Labels **`{labels}`** added to issue **#{issue_number}** in repository **`{repo_name}`**."
1661
  )
 
1662
  elif action == "close_issue":
1663
  if not all([repo_name, issue_number]):
1664
  raise ValueError("Missing parameters: repo_name, issue_number")
 
1666
  issue = repo.get_issue(number=int(issue_number))
1667
  issue.edit(state='closed')
1668
  return f"Issue **#{issue_number}** closed in repository **`{repo_name}`**."
 
1669
  elif action == "add_comment_to_issue":
1670
  if not all([repo_name, issue_number, message]):
1671
  raise ValueError("Missing parameters: repo_name, issue_number, message")
 
1673
  issue = repo.get_issue(number=int(issue_number))
1674
  issue.create_comment(body=message)
1675
  return f"Comment added to issue **#{issue_number}** in repository **`{repo_name}`**."
 
1676
  elif action == "create_release":
1677
  if not all([repo_name, tag, name, message]):
1678
  raise ValueError("Missing parameters: repo_name, tag, name, message")
 
1681
  return (
1682
  f"Release **`{name}`** created in repository **`{repo_name}`**! [Open Release]({release.html_url})"
1683
  )
 
1684
  elif action == "list_releases":
1685
  if not repo_name:
1686
  raise ValueError("Missing parameter: repo_name")
 
1690
  return f"No releases in repository **`{repo_name}`**."
1691
  releases_list = "\n".join([f"- [{release.tag_name}]({release.html_url})" for release in releases])
1692
  return f"Releases in repository **`{repo_name}`**:\n{releases_list}"
 
1693
  elif action == "fork_repository":
1694
  if not repo_name:
1695
  raise ValueError("Missing parameter: repo_name")
1696
  repo = g.get_repo(repo_name)
1697
  fork = user.create_fork(repo)
1698
  return f"Repository **`{repo_name}`** forked! [Open fork]({fork.html_url})"
 
1699
  elif action == "list_forks":
1700
  if not repo_name:
1701
  raise ValueError("Missing parameter: repo_name")
 
1705
  return f"No forks of repository **`{repo_name}`**."
1706
  forks_list = "\n".join([f"- [{fork.full_name}]({fork.html_url})" for fork in forks])
1707
  return f"Forks of repository **`{repo_name}`**:\n{forks_list}"
 
1708
  elif action == "list_files":
1709
  if not all([owner, repo_name]):
1710
  raise ValueError("Missing parameters: owner, repo_name")
 
1714
  return f"No files in path **`{path}`** of repository **`{repo_name}`**."
1715
  files_list = "\n".join([f"- [{content.name}]({content.download_url})" for content in contents])
1716
  return f"Files in path **`{path}`** of repository **`{repo_name}`**:\n{files_list}"
 
1717
  elif action == "get_repository_info":
1718
  if not all([owner, repo_name]):
1719
  raise ValueError("Missing parameters: owner, repo_name")
 
1732
  }
1733
  info_md = "\n".join([f"- **{key}**: {value}" for key, value in info.items()])
1734
  return f"Repository info for **`{repo_name}`**:\n{info_md}"
 
1735
  elif action == "get_file_content":
1736
  if not all([owner, repo_name, path]):
1737
  raise ValueError("Missing parameters: owner, repo_name, path")
 
1739
  return (
1740
  f"File content of **`{path}`** from repository **`{repo_name}`**:\n\n`\n{content_text}\n`"
1741
  )
 
1742
  elif action == "analyze_repository_by_url":
1743
  if not repo_url:
1744
  raise ValueError("Missing parameter: repo_url")
1745
  owner, repo_name = extract_repo_info(repo_url)
1746
  if not owner or not repo_name:
1747
  raise ValueError("Invalid repository URL")
 
1748
  repo = g.get_repo(f"{owner}/{repo_name}")
1749
  contents = repo.get_contents("")
1750
  file_analyses = []
 
1765
  for f in file_analyses
1766
  ])
1767
  return analysis_md
 
1768
  elif action == "analyze_repository_content":
1769
  if not all([owner, repo_name]):
1770
  raise ValueError("Missing parameters: owner, repo_name")
 
1788
  for f in file_analyses
1789
  ])
1790
  return analysis_md
 
1791
  elif action == "delete_repository":
1792
  if not repo_name:
1793
  raise ValueError("Missing parameter: repo_name")
1794
  repo = user.get_repo(repo_name)
1795
  repo.delete()
1796
  return f"Repository **`{repo_name}`** deleted!"
 
1797
  elif action == "update_repository_description":
1798
  if not all([repo_name, new_description]):
1799
  raise ValueError("Missing parameters: repo_name, new_description")
1800
  repo = user.get_repo(repo_name)
1801
  repo.edit(description=new_description)
1802
  return f"Repository **`{repo_name}`** description updated to: \"{new_description}\""
 
1803
  elif action == "edit_issue":
1804
  if not all([repo_name, issue_number]):
1805
  raise ValueError("Missing parameters: repo_name, issue_number")
 
1817
  issue.edit(**issue_update_params)
1818
  updated_fields = ", ".join(issue_update_params.keys())
1819
  return f"Issue **#{issue_number}** in repository **`{repo_name}`** updated fields: {updated_fields}"
 
1820
  elif action == "list_closed_issues":
1821
  if not repo_name:
1822
  raise ValueError("Missing parameter: repo_name")
 
1826
  return f"No closed issues in repository **`{repo_name}`**."
1827
  issues_list = "\n".join([f"- [{issue.title}]({issue.html_url})" for issue in issues])
1828
  return f"Closed issues in repository **`{repo_name}`**:\n{issues_list}"
 
1829
  elif action == "get_issue_details":
1830
  if not all([repo_name, issue_number]):
1831
  raise ValueError("Missing parameters: repo_name, issue_number")
 
1853
  """
1854
  else:
1855
  details += "No comments."
 
1856
  return details
 
1857
  else:
1858
  raise ValueError(f"Unknown action: {action}")
 
1859
  except GithubException as e:
1860
  return f"**GitHub Error:** {e}"
1861
  except ValueError as e:
 
1864
  return f"**Connection Error:** {e}"
1865
  except Exception as e:
1866
  return f"**Unexpected Error:** {e}"
 
 
1867
  with gr.Blocks() as demo:
1868
  gr.Markdown("# GitHub Tool Plugingit (Simplified Interface)")
 
1869
  with gr.Column():
1870
  action = gr.Dropdown(
1871
  choices=[
 
1909
  value=param_details["default"] if "default" in param_details else ""
1910
  )
1911
  template_params_ui[template_key] = params_section
 
1912
  branch = gr.Textbox(label="Branch", value="main")
1913
  path = gr.Textbox(label="File Path")
1914
  content = gr.Code(label="File Content", lines=5, language='python', visible=True)
 
1931
  issue_title = gr.Textbox(label="New Issue Title", visible=False)
1932
  issue_body = gr.Textbox(label="New Issue Body", visible=False, lines=3)
1933
  issue_state = gr.Dropdown(label="New Issue State (open/closed)", choices=["open", "closed", None], value=None, allow_none=True, visible=False)
 
1934
  def show_template_params(template_name):
1935
  visibility_map = {key: gr.Column.update(visible=False) for key in PROJECT_TEMPLATES if
1936
  "params" in PROJECT_TEMPLATES[key]}
 
1938
  visibility_map[template_name] = gr.Column.update(visible=True)
1939
  return [visibility_map.get(key, gr.Column.update(visible=False)) for key in PROJECT_TEMPLATES if
1940
  "params" in PROJECT_TEMPLATES[key]]
 
1941
  template_param_visibility_outputs = [template_params_ui[key] for key in PROJECT_TEMPLATES if
1942
  "params" in PROJECT_TEMPLATES[key]]
1943
  template_name.change(
 
1945
  inputs=[template_name],
1946
  outputs=template_param_visibility_outputs
1947
  )
 
1948
  run_button = gr.Button("Execute")
1949
  output = gr.Markdown(label="Result")
 
1950
  input_components = [
1951
  action, repo_name, branch, path, content, message, owner, vcs_url, title, body, base, head, issue_number,
1952
  labels, tag, release_name, file_url, repo_url, template_name, new_description, issue_title, issue_body,
1953
  issue_state, diff, diff_message
1954
  ]
 
1955
  for template_key in PROJECT_TEMPLATES:
1956
  if "params" in PROJECT_TEMPLATES[template_key]:
1957
  for param_name in template_params_ui:
1958
+ if param_name in
1959
+ Use code with caution.
1960
+ Python
1961
+ 57.3s
1962
+ kontynuuj
1963
 
1964
+ PROJECT_TEMPLATES[template_key]["params"]:
1965
+ input_components.append(template_params_ui[param_name])
1966
  def show_hide_input_fields(action_name):
1967
  visibility_map = {
1968
  "repo_name": gr.Textbox.update(visible=False),
 
1990
  "issue_body": gr.Textbox.update(visible=False),
1991
  "issue_state": gr.Dropdown.update(visible=False),
1992
  }
 
1993
  if action_name in ["import_repository"]:
1994
  visibility_map.update({"repo_name": gr.Textbox.update(visible=True), "owner": gr.Textbox.update(visible=True), "vcs_url": gr.Textbox.update(visible=True)})
1995
  elif action_name in ["create_repository", "delete_repository", "list_branches", "list_open_pull_requests", "list_issues", "list_closed_issues", "list_releases", "list_forks"]:
 
2032
  visibility_map.update({"repo_url": gr.Textbox.update(visible=True)})
2033
  elif action_name == "update_repository_description":
2034
  visibility_map.update({"repo_name": gr.Textbox.update(visible=True), "new_description": gr.Textbox.update(visible=True)})
 
 
2035
  return [visibility_map.get(key, gr.Textbox.update(visible=False)) for key in visibility_map]
 
2036
  output_components_visibility = [
2037
  repo_name, branch, path, content, message, owner, vcs_url, title, body, base, head, issue_number, labels,
2038
  tag, release_name, file_url, repo_url, template_name, new_description, issue_title, issue_body,
2039
  issue_state, diff, diff_message
2040
  ]
 
2041
  action.change(
2042
  show_hide_input_fields,
2043
  inputs=[action],
2044
  outputs=output_components_visibility
2045
  )
 
 
2046
  run_button.click(
2047
  github_tool,
2048
  inputs=input_components,
2049
  outputs=output,
2050
  api_name="github_tool"
2051
  )
 
2052
  demo.launch()