- types.ts: projections-Settings erweitert (enabled, outputFolder, dailyLog, sessionLog, weeklyDigest), heatmap zu BuiltinFormat - formatters.ts: Query-Results → Markdown (Timeline, Table, Summary, Metric, Heatmap, Custom) - Presets: daily-log (Tagesprotokoll), session-log (Session-Protokoll), weekly-digest (Wochenuebersicht) - template-registry.ts: Built-in + Custom ProjectionTemplate Verwaltung - projection-engine.ts: Kern-Engine mit Scheduling, Session-End-Listener, ProjectionPickerModal - main.ts: ProjectionEngine Integration, 2 neue Commands (run-projection, run-all-projections) - settings-tab.ts: Neue Sektion "Projektionen" mit Toggles und Konfiguration - styles.css: ProjectionPickerModal Styling Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
102 lines
2.5 KiB
TypeScript
102 lines
2.5 KiB
TypeScript
import { ProjectionTemplate } from '../../types';
|
|
|
|
export const dailyLogTemplate: ProjectionTemplate = {
|
|
id: 'builtin:daily-log',
|
|
name: 'Tagesprotokoll',
|
|
description: 'Sessions, aktive Dateien, Events und Zeitleiste des Tages.',
|
|
enabled: false,
|
|
trigger: { type: 'manual' },
|
|
output: {
|
|
folder: '',
|
|
filePattern: '{{date}}-daily-log.md',
|
|
mode: 'overwrite',
|
|
frontmatter: {
|
|
type: 'logfire/daily-log',
|
|
date: '{{date}}',
|
|
},
|
|
},
|
|
sections: [
|
|
{
|
|
id: 'sessions',
|
|
heading: 'Sessions',
|
|
type: 'table',
|
|
query: {
|
|
timeRange: { type: 'relative', value: 'today' },
|
|
eventTypes: ['system:session-start', 'system:session-end'],
|
|
},
|
|
format: {
|
|
type: 'builtin',
|
|
builtin: {
|
|
name: 'table',
|
|
columns: [
|
|
{ header: 'Session', value: 'session' },
|
|
{ header: 'Typ', value: 'type' },
|
|
{ header: 'Zeit', value: 'timestamp' },
|
|
],
|
|
},
|
|
},
|
|
enabled: true,
|
|
},
|
|
{
|
|
id: 'active-files',
|
|
heading: 'Aktive Dateien',
|
|
type: 'table',
|
|
query: {
|
|
timeRange: { type: 'relative', value: 'today' },
|
|
groupBy: 'file',
|
|
orderBy: 'count',
|
|
orderDirection: 'desc',
|
|
limit: 20,
|
|
},
|
|
format: {
|
|
type: 'builtin',
|
|
builtin: {
|
|
name: 'table',
|
|
columns: [
|
|
{ header: 'Datei', value: 'group' },
|
|
{ header: 'Events', value: 'count' },
|
|
{ header: 'Woerter+', value: 'words_added' },
|
|
{ header: 'Woerter-', value: 'words_removed' },
|
|
],
|
|
},
|
|
},
|
|
enabled: true,
|
|
},
|
|
{
|
|
id: 'event-summary',
|
|
heading: 'Event-Uebersicht',
|
|
type: 'table',
|
|
query: {
|
|
timeRange: { type: 'relative', value: 'today' },
|
|
groupBy: 'type',
|
|
orderBy: 'count',
|
|
orderDirection: 'desc',
|
|
},
|
|
format: {
|
|
type: 'builtin',
|
|
builtin: {
|
|
name: 'table',
|
|
columns: [
|
|
{ header: 'Typ', value: 'group' },
|
|
{ header: 'Anzahl', value: 'count' },
|
|
],
|
|
},
|
|
},
|
|
enabled: true,
|
|
},
|
|
{
|
|
id: 'timeline',
|
|
heading: 'Zeitleiste',
|
|
type: 'timeline',
|
|
query: {
|
|
timeRange: { type: 'relative', value: 'today' },
|
|
limit: 100,
|
|
},
|
|
format: {
|
|
type: 'builtin',
|
|
builtin: { name: 'timeline', showTimestamp: true, showPayload: false },
|
|
},
|
|
enabled: true,
|
|
},
|
|
],
|
|
};
|