Feature: Claude Assistent Chat in TaskMate
Neuer Tab "Assistent" mit interaktiver Claude Code Session: - Chat-UI mit Session-Verwaltung (History, neue/alte Sessions) - Claude CLI als Child-Process auf dem Host (interaktiv, mit Rueckfragen) - Streaming-Output per Socket.io - Nur fuer autorisierte User (Hendrik, Monami) - 30 Min Inaktivitaets-Timeout - Task-Uebergabe: Button im Task-Modal sendet Aufgabe an Assistenten - Chat-Verlauf wird in DB gespeichert Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dieser Commit ist enthalten in:
@@ -7,6 +7,7 @@
|
||||
import store from './store.js';
|
||||
import api from './api.js';
|
||||
import syncManager from './sync.js';
|
||||
import assistantManager from './assistant.js';
|
||||
import {
|
||||
$, $$, createElement, clearElement, formatDate, formatDateTime,
|
||||
formatRelativeTime, formatFileSize, getInitials, hexToRgba,
|
||||
@@ -72,6 +73,9 @@ class TaskModalManager {
|
||||
// Archive button
|
||||
$('#btn-archive-task')?.addEventListener('click', () => this.handleArchive());
|
||||
|
||||
// Task to Assistant button
|
||||
$('#btn-task-to-assistant')?.addEventListener('click', () => this.handleTaskToAssistant());
|
||||
|
||||
// Restore button
|
||||
$('#btn-restore-task')?.addEventListener('click', () => this.handleRestore());
|
||||
|
||||
@@ -225,6 +229,7 @@ class TaskModalManager {
|
||||
const duplicateBtn = $('#btn-duplicate-task');
|
||||
const archiveBtn = $('#btn-archive-task');
|
||||
const restoreBtn = $('#btn-restore-task');
|
||||
const assistantBtn = $('#btn-task-to-assistant');
|
||||
const saveBtn = $('#btn-save-task');
|
||||
const cancelBtn = $('#btn-cancel-task');
|
||||
const backBtn = $('#btn-back-task');
|
||||
@@ -233,6 +238,7 @@ class TaskModalManager {
|
||||
if (deleteBtn) deleteBtn.classList.toggle('hidden', mode === 'create');
|
||||
if (duplicateBtn) duplicateBtn.classList.toggle('hidden', mode === 'create');
|
||||
if (archiveBtn) archiveBtn.classList.toggle('hidden', mode === 'create');
|
||||
if (assistantBtn) assistantBtn.classList.toggle('hidden', mode === 'create');
|
||||
if (restoreBtn) restoreBtn.classList.add('hidden'); // Always hide initially, shown in loadTaskData if archived
|
||||
|
||||
// Right side buttons (create vs edit mode)
|
||||
@@ -596,6 +602,33 @@ class TaskModalManager {
|
||||
}
|
||||
}
|
||||
|
||||
handleTaskToAssistant() {
|
||||
if (!this.originalTask) return;
|
||||
|
||||
const task = this.originalTask;
|
||||
const priorityLabels = { low: 'Niedrig', medium: 'Mittel', high: 'Hoch', urgent: 'Dringend' };
|
||||
|
||||
// Build context text
|
||||
let context = `Aufgabe: ${task.title}\n`;
|
||||
if (task.description) context += `Beschreibung: ${task.description}\n`;
|
||||
context += `Prioritaet: ${priorityLabels[task.priority] || task.priority}\n`;
|
||||
|
||||
if (task.labels && task.labels.length > 0) {
|
||||
context += `Labels: ${task.labels.map(l => l.name).join(', ')}\n`;
|
||||
}
|
||||
|
||||
if (this.subtasks && this.subtasks.length > 0) {
|
||||
context += `\nSubtasks:\n`;
|
||||
this.subtasks.forEach(st => {
|
||||
context += `- [${st.completed ? 'x' : ' '}] ${st.title}\n`;
|
||||
});
|
||||
}
|
||||
|
||||
// Close modal and hand over to assistant
|
||||
this.close();
|
||||
assistantManager.handleTaskHandover(context);
|
||||
}
|
||||
|
||||
showColumnSelectDialog() {
|
||||
const columns = store.get('columns');
|
||||
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren