diff --git a/.env.example b/.env.example index 6ff8470..7b393e6 100644 --- a/.env.example +++ b/.env.example @@ -23,7 +23,7 @@ AI_API_KEY=your-mistral-api-key AI_RATE_LIMIT_DELAY_MS=1000 # Git Integration (Required for contributions) -GIT_REPO_URL=https://git.cc24.dev/mstoeck3/cc24-hub +GIT_REPO_URL=https://git.cc24.dev/mstoeck3/forensic-pathways GIT_PROVIDER=gitea GIT_API_ENDPOINT=https://git.cc24.dev/api/v1 GIT_API_TOKEN=your-git-api-token diff --git a/.gitignore b/.gitignore index 3aed3a2..35db4ed 100644 --- a/.gitignore +++ b/.gitignore @@ -84,3 +84,4 @@ temp/ .astro/settings.json .astro/data-store.json .astro/content.d.ts +prompt.md diff --git a/README.md b/README.md index d210ee0..bc5cad4 100644 --- a/README.md +++ b/README.md @@ -78,8 +78,8 @@ Ein kuratiertes Verzeichnis für Digital Forensics und Incident Response (DFIR) ```bash # Repository klonen -git clone https://git.cc24.dev/mstoeck3/cc24-hub.git -cd cc24-hub +git clone https://git.cc24.dev/mstoeck3/forensic-pathways.git +cd forensic-pathways # Dependencies installieren npm install @@ -117,8 +117,8 @@ sudo systemctl enable nginx ```bash # Klonen des Repositorys -sudo git clone https://git.cc24.dev/mstoeck3/cc24-hub /opt/cc24-hub -cd /opt/cc24-hub +sudo git clone https://git.cc24.dev/mstoeck3/forensic-pathways /opt/forensic-pathways +cd /opt/forensic-pathways # Abhängigkeiten installieren sudo npm install @@ -127,12 +127,12 @@ sudo npm install sudo npm run build # Berechtigungen setzen -sudo chown -R www-data:www-data /opt/cc24-hub +sudo chown -R www-data:www-data /opt/forensic-pathways ``` #### 3. Umgebungsvariablen konfigurieren -Erstelle `/opt/cc24-hub/.env`: +Erstelle `/opt/forensic-pathways/.env`: ```bash # =========================================== @@ -160,7 +160,7 @@ AI_API_KEY=your-mistral-api-key AI_RATE_LIMIT_DELAY_MS=1000 # Git Integration (Required for contributions) -GIT_REPO_URL=https://git.cc24.dev/mstoeck3/cc24-hub +GIT_REPO_URL=https://git.cc24.dev/mstoeck3/forensic-pathways GIT_PROVIDER=gitea GIT_API_ENDPOINT=https://git.cc24.dev/api/v1 GIT_API_TOKEN=your-git-api-token @@ -178,13 +178,13 @@ NEXTCLOUD_PUBLIC_URL=https://your-nextcloud.com/s/ ```bash # Berechtigungen sichern -sudo chmod 600 /opt/cc24-hub/.env -sudo chown www-data:www-data /opt/cc24-hub/.env +sudo chmod 600 /opt/forensic-pathways/.env +sudo chown www-data:www-data /opt/forensic-pathways/.env ``` #### 4. Nginx konfigurieren -Erstelle `/etc/nginx/sites-available/cc24-hub`: +Erstelle `/etc/nginx/sites-available/forensic-pathways`: ```nginx server { @@ -212,7 +212,7 @@ server { # Static Files location / { try_files $uri $uri/ @nodejs; - root /opt/cc24-hub/dist; + root /opt/forensic-pathways/dist; index index.html; # Cache static assets @@ -244,14 +244,14 @@ server { ```bash # Site aktivieren -sudo ln -s /etc/nginx/sites-available/cc24-hub /etc/nginx/sites-enabled/ +sudo ln -s /etc/nginx/sites-available/forensic-pathways /etc/nginx/sites-enabled/ sudo nginx -t sudo systemctl reload nginx ``` #### 5. Systemd Service einrichten -Erstelle `/etc/systemd/system/cc24-hub.service`: +Erstelle `/etc/systemd/system/forensic-pathways.service`: ```ini [Unit] @@ -263,7 +263,7 @@ Wants=nginx.service Type=exec User=www-data Group=www-data -WorkingDirectory=/opt/cc24-hub +WorkingDirectory=/opt/forensic-pathways Environment=NODE_ENV=production ExecStart=/usr/bin/node ./dist/server/entry.mjs Restart=always @@ -276,7 +276,7 @@ NoNewPrivileges=yes PrivateTmp=yes ProtectSystem=strict ProtectHome=yes -ReadWritePaths=/opt/cc24-hub +ReadWritePaths=/opt/forensic-pathways CapabilityBoundingSet= # Resource Limits @@ -290,11 +290,11 @@ WantedBy=multi-user.target ```bash # Service aktivieren und starten sudo systemctl daemon-reload -sudo systemctl enable cc24-hub -sudo systemctl start cc24-hub +sudo systemctl enable forensic-pathways +sudo systemctl start forensic-pathways # Status prüfen -sudo systemctl status cc24-hub +sudo systemctl status forensic-pathways ``` ## 🔧 Konfiguration @@ -438,7 +438,7 @@ domain-agnostic-software: ```bash # Repository aktualisieren -cd /opt/cc24-hub +cd /opt/forensic-pathways sudo git pull # Dependencies aktualisieren @@ -448,7 +448,7 @@ sudo npm install sudo npm run build # Service neustarten -sudo systemctl restart cc24-hub +sudo systemctl restart forensic-pathways ``` ## 💾 Backup @@ -456,10 +456,10 @@ sudo systemctl restart cc24-hub Wichtige Dateien für Backup: ```bash -/opt/cc24-hub/src/data/tools.yaml -/opt/cc24-hub/.env -/etc/nginx/sites-available/cc24-hub -/etc/systemd/system/cc24-hub.service +/opt/forensic-pathways/src/data/tools.yaml +/opt/forensic-pathways/.env +/etc/nginx/sites-available/forensic-pathways +/etc/systemd/system/forensic-pathways.service ``` ## 🤝 Beiträge @@ -475,7 +475,7 @@ Contributions sind willkommen! Bitte: Bei Problemen oder Fragen: -- **Issues:** [Repository Issues](https://git.cc24.dev/mstoeck3/cc24-hub/issues) +- **Issues:** [Repository Issues](https://git.cc24.dev/mstoeck3/forensic-pathways/issues) - **Dokumentation:** Siehe `/knowledgebase` auf der Website ## 📄 Lizenz diff --git a/context.md b/context.md index e043f36..c8f937d 100644 --- a/context.md +++ b/context.md @@ -268,7 +268,7 @@ This architecture emphasizes maintainability, user experience, and extensibility 2. **Add selectively**: Include 1-3 secondary files based on the specific development task 3. **Reference others**: Mention other relevant files by name/purpose without including full content -user01@altiera /v/h/u/P/cc24-hub (main)> tree src +user01@altiera /v/h/u/P/forensic-pathways (main)> tree src src ├── components │ ├── AIQueryInterface.astro diff --git a/src/components/AIQueryInterface.astro b/src/components/AIQueryInterface.astro index 7e13157..66e0412 100644 --- a/src/components/AIQueryInterface.astro +++ b/src/components/AIQueryInterface.astro @@ -444,39 +444,46 @@ document.addEventListener('DOMContentLoaded', () => { } }; - // Smart Prompting Input Handling + // Smart Prompting Input Handling - Fixed Race Conditions aiInput.addEventListener('input', () => { console.log('[DEBUG] Input event triggered, length:', aiInput.value.trim().length); const inputLength = aiInput.value.trim().length; - // Clear existing timeout + // Clear ALL existing timeouts and abort controllers clearTimeout(enhancementTimeout); - - // Cancel any pending enhancement call if (enhancementAbortController) { enhancementAbortController.abort(); + enhancementAbortController = null; } - // Hide suggestions if input is too short + // Hide suggestions immediately if input is too short if (inputLength < 40) { showPromptingStatus('hidden'); return; } - // Show analyzing state after 1 second - setTimeout(() => { - if (aiInput.value.trim().length >= 50) { - showPromptingStatus('analyzing'); - } - }, 1000); - - // Trigger AI enhancement after 1.5 seconds + // Single consolidated timeout for all smart prompting logic enhancementTimeout = setTimeout(() => { - console.log('[DEBUG] Enhancement timeout fired, calling triggerSmartPrompting'); - if (aiInput.value.trim().length >= 40) { - triggerSmartPrompting(); + const currentLength = aiInput.value.trim().length; + + // Double-check length hasn't changed during timeout + if (currentLength < 40) { + showPromptingStatus('hidden'); + return; } - }, 1500); + + // Show analyzing state first + if (currentLength >= 50) { + showPromptingStatus('analyzing'); + + // Trigger enhancement after showing analyzing state + setTimeout(() => { + if (aiInput.value.trim().length >= 50) { + triggerSmartPrompting(); + } + }, 500); + } + }, 1000); // Single timeout instead of multiple }); aiInput.addEventListener('input', updateCharacterCount); diff --git a/src/components/Footer.astro b/src/components/Footer.astro index 7fa188a..481e1c2 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -11,7 +11,7 @@
+ Finden Sie schnell das passende Werkzeug für Ihre spezifische Anforderung +
++ Tipp: Die Szenarien durchsuchen automatisch nach passenden Tags und Beschreibungen. + Für KI-gestützte Empfehlungen nutzen Sie den entsprechenden Modus. +
+