für Details"
- },
- "repo_root": {
- "type": "string",
- "required": false,
- "default": ".",
- "description": "Root-Verzeichnis des Git-Repositories für Pfad-Referenzen"
- },
- "include_stats": {
- "type": "boolean",
- "required": false,
- "default": true,
- "description": "Ob statistische Auswertungen eingebunden werden sollen"
}
},
"tags": [
diff --git a/templates/system/summarizer.json b/templates/system/summarizer.json
index 4a43156..2d56762 100644
--- a/templates/system/summarizer.json
+++ b/templates/system/summarizer.json
@@ -23,7 +23,7 @@
},
"format": {
"type": "enum",
- "values": [" bullets", "paragraph"],
+ "values": ["bullets", "paragraph"],
"default": "bullets"
}
},
diff --git a/templates/user/brainstorming.md b/templates/user/brainstorming.md
deleted file mode 100644
index 01bdecc..0000000
--- a/templates/user/brainstorming.md
+++ /dev/null
@@ -1,47 +0,0 @@
-# Brainstorming Template
-
-**Kurzbeschreibung:**
-Ein strukturiertes Brainstorming-Template für schnelle Ideenfindung und Konzeptentwicklung.
-
-**Tags:** #brainstorming #ideation #konzept #team
-
----
-
-## Struktur
-
-### 1. **Thema / Fragestellung**
-_Definiere klar, worüber gebrainstormt werden soll:_
-
-```
-[Hier Thema eingeben]
-```
-
-### 2. **Lösungsansätze**
-Liste mögliche Lösungen oder Ideen auf:
-
-```markdown
-- [ ] Idee 1: ...
-- [ ] Idee 2: ...
-- [ ] Idee 3: ...
-```
-
-### 3. **Bewertung**
-Bewerte jede Idee nach:
-- Machbarkeit
-- Aufwand
-- Nutzen
-
-```
-| Idee | Machbarkeit (1-5) | Aufwand (1-5) | Nutzen (1-5) |
-|-------|-------------------|---------------|--------------|
-| Idee 1 | 3 | 2 | 5 |
-```
-
-### 4. **Nächste Schritte**
-Definiere konkrete Aktionen:
-
-```markdown
-- [ ] Idee 1 weiterverfolgen
-- [ ] Machbarkeitsanalyse durchführen
-- [ ] Team einbeziehen
-```
diff --git a/templates/user/email_draft.md b/templates/user/email_draft.md
index d385b1f..1f9dca0 100644
--- a/templates/user/email_draft.md
+++ b/templates/user/email_draft.md
@@ -9,7 +9,7 @@
## Template
```
-Schreibe eine Email mit folgenden Spearman:
+Schreibe eine Email mit folgenden Parametern:
**Betreff**: {subject}
**Empfänger**: {recipient} (Ton: {tone})
diff --git a/web/js/templates.js b/web/js/templates.js
index baba283..531c37c 100644
--- a/web/js/templates.js
+++ b/web/js/templates.js
@@ -34,10 +34,10 @@ function renderTemplates(templates) {
${t.tags.map(tag => `${esc(tag)}`).join('')}
-
-
-
-
+
+
+
+
`).join('');
@@ -90,6 +90,20 @@ function applyFilters() {
renderTemplates(list);
}
+// Event delegation: click on template cards routes to action functions
+document.addEventListener('click', (e) => {
+ const btn = e.target.closest('.btn[data-path]');
+ if (!btn) return;
+ const card = btn.closest('.template-item');
+ if (!card) return;
+ const path = btn.dataset.path;
+ const action = btn.classList.contains('btn-view') ? 'viewTemplate'
+ : btn.classList.contains('btn-edit') ? 'editModalContent'
+ : btn.classList.contains('btn-copy') ? 'copyContent'
+ : btn.classList.contains('btn-tune') ? 'tuneModalContent' : null;
+ if (action) window[action](path);
+});
+
// Export for main.js (global scope, loaded before main.js)
// renderTemplates, applyFilters, parseTypeFromHash, setNavActive
// currentType, currentQuery sind als globale Variablen verfügbar
diff --git a/web/templates.json b/web/templates.json
index f5ef347..daa5053 100644
--- a/web/templates.json
+++ b/web/templates.json
@@ -1,65 +1 @@
-[
- {
- "path": "templates/custom/brainstorming.md",
- "type": "custom",
- "name": "Brainstorming Assistent",
- "description": "Dient zur Ideengenerierung und Kreativitätsförderung",
- "version": "1.0",
- "tags": [],
- "format": "md"
- },
- {
- "path": "templates/user/email_draft.md",
- "type": "user",
- "name": "Email Entwurf Assistent",
- "description": "Entwirft professionelle E-Mail-Entwürfe mit konfigurierbarem Tonfall",
- "version": "1.0",
- "tags": [],
- "format": "md"
- },
- {
- "path": "templates/system/code_reviewer.json",
- "type": "system",
- "name": "Code Reviewer",
- "description": "Analysiert Code auf Qualität, Best Practices und potenzielle Bugs",
- "version": "1.0",
- "tags": [
- "code",
- "review",
- "quality",
- "best-practices",
- "security"
- ],
- "format": "json"
- },
- {
- "path": "templates/system/commit_analysis.json",
- "type": "system",
- "name": "Git Commit Deep Analysis",
- "description": "Erstellt eine tiefe Analyse der letzten Git-Commits mit technischer und fachlicher Bewertung",
- "version": "1.0",
- "tags": [
- "git",
- "code-review",
- "audit",
- "analysis",
- "commit",
- "quality"
- ],
- "format": "json"
- },
- {
- "path": "templates/system/summarizer.json",
- "type": "system",
- "name": "Text Summarizer",
- "description": "Erstellt präzise Zusammenfassungen von Texten mit konfigurierbarer Länge",
- "version": "1.0",
- "tags": [
- "summary",
- "text",
- "condense",
- "abstract"
- ],
- "format": "json"
- }
-]
\ No newline at end of file
+{"a":1}
\ No newline at end of file