Alibrown commited on
Commit
1af98df
·
verified ·
1 Parent(s): 016b9c9

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +21 -22
src/streamlit_app.py CHANGED
@@ -131,60 +131,59 @@ TOOL_PRESETS = {
131
  "icon": "🎨",
132
  "title": "Code Generator",
133
  "color": "#00ff88",
134
- "system_prompt": "Du bist ein Expert Code Generator. Erstelle sauberen, produktionsreifen Code mit Kommentaren. Antworte NUR mit Code in Markdown Code-Blöcken.",
135
  "templates": {
136
- "Flask REST API": "Erstelle eine Flask REST API mit:\n- CRUD Endpoints für 'tasks'\n- SQLAlchemy Models\n- Error Handling\n- CORS aktiviert",
137
- "React Component": "Erstelle eine React Functional Component mit:\n- Props für title und items (Array)\n- useState für selected item\n- Tailwind CSS Styling\n- Click Handler",
138
- "Python CLI Tool": "Erstelle ein Python CLI Tool mit:\n- argparse für Arguments\n- Logging\n- Error Handling\n- Main Guard",
139
- "FastAPI Endpoint": "Erstelle FastAPI Endpoints:\n- POST /users - Create User\n- GET /users/{id} - Get User\n- Pydantic Models\n- SQLAlchemy Integration",
140
  }
141
  },
142
  "refactor": {
143
  "icon": "🔄",
144
  "title": "Code Refactorer",
145
  "color": "#00aaff",
146
- "system_prompt": "Du bist ein Code Refactoring Expert. Analysiere Code und verbessere: Lesbarkeit, Performance, Best Practices. Erkläre deine Änderungen kurz.",
147
  "templates": {
148
- "Clean Code": "Refactore diesen Code nach Clean Code Prinzipien:\n- Verbessere Naming\n- Reduziere Komplexität\n- Extrahiere Funktionen\n\n[Füge Code hier ein]",
149
- "Performance": "Optimiere diesen Code für Performance:\n- Identifiziere Bottlenecks\n- Verbessere Algorithmen\n- Reduziere Memory Usage\n\n[Füge Code hier ein]",
150
- "Type Safety": "Füge Type Hints/TypeScript hinzu:\n- Alle Funktionen\n- Variables wo sinnvoll\n- Return Types\n\n[Füge Code hier ein]",
151
  }
152
  },
153
  "debug": {
154
  "icon": "🐛",
155
  "title": "Debug Helper",
156
  "color": "#ff4444",
157
- "system_prompt": "Du bist ein Debugging Expert. Analysiere Code/Errors systematisch. Erkläre das Problem und liefere Fix.",
158
  "templates": {
159
- "Error Analysis": "Ich habe diesen Error:\n[Error Message]\n\nIn diesem Code:\n[Code]\n\nWas ist das Problem und wie fixe ich es?",
160
- "Logic Bug": "Dieser Code macht nicht was er soll:\n[Code]\n\nErwartetes Verhalten: [beschreiben]\nAktuelles Verhalten: [beschreiben]\n\nWo ist der Logic Bug?",
161
- "Performance Issue": "Dieser Code ist zu langsam:\n[Code]\n\nInput Size: [beschreiben]\nAktuelle Runtime: [beschreiben]\n\nWo ist das Problem?",
162
  }
163
  },
164
  "docs": {
165
  "icon": "📚",
166
  "title": "Doc Generator",
167
  "color": "#ffaa00",
168
- "system_prompt": "Du bist ein Technical Writer. Erstelle klare, strukturierte Dokumentation mit Beispielen.",
169
  "templates": {
170
- "Function Docs": "Erstelle Docstrings für diese Funktionen:\n[Code]\n\nFormat: Google Style für Python / JSDoc für JavaScript",
171
- "README": "Erstelle ein README.md für dieses Projekt:\n- Beschreibung\n- Installation\n- Usage Examples\n- API Reference\n\nProjekt: [beschreiben]",
172
- "API Docs": "Erstelle API Dokumentation für diese Endpoints:\n[Code/Routes]\n\nInkl. Request/Response Beispiele",
173
  }
174
  },
175
  "explain": {
176
  "icon": "💡",
177
  "title": "Code Explainer",
178
  "color": "#aa88ff",
179
- "system_prompt": "Du bist ein Code Educator. Erkläre Code Schritt-für-Schritt, klar und verständlich.",
180
  "templates": {
181
- "ELI5": "Erkläre diesen Code als wäre ich 5:\n[Code]",
182
- "Deep Dive": "Erkläre diesen Code im Detail:\n- Was macht er?\n- Wie funktioniert er?\n- Warum wurde es so gelöst?\n- Alternativen?\n\n[Code]",
183
- "Architecture": "Erkläre die Architektur dieses Codes:\n- Design Patterns\n- Komponenten\n- Datenfluss\n\n[Code]",
184
  }
185
  }
186
  }
187
-
188
  # ----------------------------------------------------
189
  # SIDEBAR
190
  # ----------------------------------------------------
 
131
  "icon": "🎨",
132
  "title": "Code Generator",
133
  "color": "#00ff88",
134
+ "system_prompt": "You are an Expert Code Generator. Create clean, production-ready code with comments. Respond ONLY with code in Markdown code blocks.",
135
  "templates": {
136
+ "Flask REST API": "Create a Flask REST API with:\n- CRUD Endpoints for 'tasks'\n- SQLAlchemy Models\n- Error Handling\n- CORS enabled",
137
+ "React Component": "Create a React Functional Component with:\n- Props for title and items (Array)\n- useState for selected item\n- Tailwind CSS Styling\n- Click Handler",
138
+ "Python CLI Tool": "Create a Python CLI Tool with:\n- argparse for Arguments\n- Logging\n- Error Handling\n- Main Guard",
139
+ "FastAPI Endpoint": "Create FastAPI Endpoints:\n- POST /users - Create User\n- GET /users/{id} - Get User\n- Pydantic Models\n- SQLAlchemy Integration",
140
  }
141
  },
142
  "refactor": {
143
  "icon": "🔄",
144
  "title": "Code Refactorer",
145
  "color": "#00aaff",
146
+ "system_prompt": "You are a Code Refactoring Expert. Analyze code and improve: readability, performance, best practices. Explain your changes briefly.",
147
  "templates": {
148
+ "Clean Code": "Refactor this code according to Clean Code principles:\n- Improve Naming\n- Reduce Complexity\n- Extract Functions\n\n[Insert Code Here]",
149
+ "Performance": "Optimize this code for performance:\n- Identify Bottlenecks\n- Improve Algorithms\n- Reduce Memory Usage\n\n[Insert Code Here]",
150
+ "Type Safety": "Add Type Hints/TypeScript:\n- All Functions\n- Variables where appropriate\n- Return Types\n\n[Insert Code Here]",
151
  }
152
  },
153
  "debug": {
154
  "icon": "🐛",
155
  "title": "Debug Helper",
156
  "color": "#ff4444",
157
+ "system_prompt": "You are a Debugging Expert. Analyze code/errors systematically. Explain the problem and provide the fix.",
158
  "templates": {
159
+ "Error Analysis": "I have this error:\n[Error Message]\n\nIn this code:\n[Code]\n\nWhat is the problem and how do I fix it?",
160
+ "Logic Bug": "This code doesn't do what it's supposed to:\n[Code]\n\nExpected behavior: [describe]\nActual behavior: [describe]\n\nWhere is the logic bug?",
161
+ "Performance Issue": "This code is too slow:\n[Code]\n\nInput Size: [describe]\nCurrent Runtime: [describe]\n\nWhere is the problem?",
162
  }
163
  },
164
  "docs": {
165
  "icon": "📚",
166
  "title": "Doc Generator",
167
  "color": "#ffaa00",
168
+ "system_prompt": "You are a Technical Writer. Create clear, structured documentation with examples.",
169
  "templates": {
170
+ "Function Docs": "Create Docstrings for these functions:\n[Code]\n\nFormat: Google Style for Python / JSDoc for JavaScript",
171
+ "README": "Create a README.md for this project:\n- Description\n- Installation\n- Usage Examples\n- API Reference\n\nProject: [describe]",
172
+ "API Docs": "Create API Documentation for these Endpoints:\n[Code/Routes]\n\nIncl. Request/Response Examples",
173
  }
174
  },
175
  "explain": {
176
  "icon": "💡",
177
  "title": "Code Explainer",
178
  "color": "#aa88ff",
179
+ "system_prompt": "You are a Code Educator. Explain code step-by-step, clearly and understandably.",
180
  "templates": {
181
+ "ELI5": "Explain this code as if I were 5:\n[Code]",
182
+ "Deep Dive": "Explain this code in detail:\n- What does it do?\n- How does it work?\n- Why was it solved this way?\n- Alternatives?\n\n[Code]",
183
+ "Architecture": "Explain the architecture of this code:\n- Design Patterns\n- Components\n- Data Flow\n\n[Code]",
184
  }
185
  }
186
  }
 
187
  # ----------------------------------------------------
188
  # SIDEBAR
189
  # ----------------------------------------------------