feat(ui): expose all editable prompt files, drop agent prompt
This commit is contained in:
@@ -2,7 +2,7 @@ using System.Text;
|
|||||||
|
|
||||||
namespace ClaudeDo.Data;
|
namespace ClaudeDo.Data;
|
||||||
|
|
||||||
public enum PromptKind { System, Planning, PlanningInitial, Retry, DailyPrep, WeeklyReport, Agent }
|
public enum PromptKind { System, Planning, PlanningInitial, Retry, DailyPrep, WeeklyReport }
|
||||||
|
|
||||||
public static class PromptFiles
|
public static class PromptFiles
|
||||||
{
|
{
|
||||||
@@ -16,7 +16,6 @@ public static class PromptFiles
|
|||||||
PromptKind.Retry => Path.Combine(Root, "retry.md"),
|
PromptKind.Retry => Path.Combine(Root, "retry.md"),
|
||||||
PromptKind.DailyPrep => Path.Combine(Root, "daily-prep.md"),
|
PromptKind.DailyPrep => Path.Combine(Root, "daily-prep.md"),
|
||||||
PromptKind.WeeklyReport => Path.Combine(Root, "weekly-report.md"),
|
PromptKind.WeeklyReport => Path.Combine(Root, "weekly-report.md"),
|
||||||
PromptKind.Agent => Path.Combine(Root, "agent.md"),
|
|
||||||
_ => throw new ArgumentOutOfRangeException(nameof(kind))
|
_ => throw new ArgumentOutOfRangeException(nameof(kind))
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -60,7 +59,6 @@ public static class PromptFiles
|
|||||||
PromptKind.Retry => RetryDefault,
|
PromptKind.Retry => RetryDefault,
|
||||||
PromptKind.DailyPrep => DailyPrepDefault,
|
PromptKind.DailyPrep => DailyPrepDefault,
|
||||||
PromptKind.WeeklyReport => WeeklyReportDefault,
|
PromptKind.WeeklyReport => WeeklyReportDefault,
|
||||||
PromptKind.Agent => "",
|
|
||||||
_ => ""
|
_ => ""
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -43,8 +43,11 @@
|
|||||||
"restoreDefaultAgents": "Standard-Agenten wiederherstellen",
|
"restoreDefaultAgents": "Standard-Agenten wiederherstellen",
|
||||||
"promptsSection": "PROMPTS",
|
"promptsSection": "PROMPTS",
|
||||||
"systemPrompt": "System",
|
"systemPrompt": "System",
|
||||||
"planningPrompt": "Planung",
|
"planningPrompt": "Planung (System)",
|
||||||
"agentPrompt": "Agent",
|
"planningInitialPrompt": "Planungs-Start",
|
||||||
|
"retryPrompt": "Wiederholung",
|
||||||
|
"dailyPrepPrompt": "Tagesplanung",
|
||||||
|
"weeklyReportPrompt": "Wochenbericht",
|
||||||
"openInEditor": "Im Editor öffnen"
|
"openInEditor": "Im Editor öffnen"
|
||||||
},
|
},
|
||||||
"prime": {
|
"prime": {
|
||||||
|
|||||||
@@ -43,8 +43,11 @@
|
|||||||
"restoreDefaultAgents": "Restore default agents",
|
"restoreDefaultAgents": "Restore default agents",
|
||||||
"promptsSection": "PROMPTS",
|
"promptsSection": "PROMPTS",
|
||||||
"systemPrompt": "System",
|
"systemPrompt": "System",
|
||||||
"planningPrompt": "Planning",
|
"planningPrompt": "Planning (system)",
|
||||||
"agentPrompt": "Agent",
|
"planningInitialPrompt": "Planning kickoff",
|
||||||
|
"retryPrompt": "Retry",
|
||||||
|
"dailyPrepPrompt": "Daily prep",
|
||||||
|
"weeklyReportPrompt": "Weekly report",
|
||||||
"openInEditor": "Open in editor"
|
"openInEditor": "Open in editor"
|
||||||
},
|
},
|
||||||
"prime": {
|
"prime": {
|
||||||
|
|||||||
@@ -16,7 +16,10 @@ public sealed partial class FilesSettingsTabViewModel : ViewModelBase
|
|||||||
|
|
||||||
public string SystemPromptPath { get; } = PromptFiles.PathFor(PromptKind.System);
|
public string SystemPromptPath { get; } = PromptFiles.PathFor(PromptKind.System);
|
||||||
public string PlanningPromptPath { get; } = PromptFiles.PathFor(PromptKind.Planning);
|
public string PlanningPromptPath { get; } = PromptFiles.PathFor(PromptKind.Planning);
|
||||||
public string AgentPromptPath { get; } = PromptFiles.PathFor(PromptKind.Agent);
|
public string PlanningInitialPromptPath { get; } = PromptFiles.PathFor(PromptKind.PlanningInitial);
|
||||||
|
public string RetryPromptPath { get; } = PromptFiles.PathFor(PromptKind.Retry);
|
||||||
|
public string DailyPrepPromptPath { get; } = PromptFiles.PathFor(PromptKind.DailyPrep);
|
||||||
|
public string WeeklyReportPromptPath { get; } = PromptFiles.PathFor(PromptKind.WeeklyReport);
|
||||||
|
|
||||||
public FilesSettingsTabViewModel(WorkerClient worker) => _worker = worker;
|
public FilesSettingsTabViewModel(WorkerClient worker) => _worker = worker;
|
||||||
|
|
||||||
|
|||||||
@@ -181,7 +181,7 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Spacing="6">
|
<StackPanel Spacing="6">
|
||||||
<TextBlock Classes="section-label" Text="{loc:Tr settings.files.promptsSection}"/>
|
<TextBlock Classes="section-label" Text="{loc:Tr settings.files.promptsSection}"/>
|
||||||
<Grid RowDefinitions="Auto,Auto,Auto" ColumnDefinitions="90,*,Auto" RowSpacing="8">
|
<Grid RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto" ColumnDefinitions="120,*,Auto" RowSpacing="8">
|
||||||
<TextBlock Grid.Row="0" Grid.Column="0" Classes="field-label" Text="{loc:Tr settings.files.systemPrompt}" VerticalAlignment="Center"/>
|
<TextBlock Grid.Row="0" Grid.Column="0" Classes="field-label" Text="{loc:Tr settings.files.systemPrompt}" VerticalAlignment="Center"/>
|
||||||
<TextBlock Grid.Row="0" Grid.Column="1" Classes="path-mono" Text="{Binding Files.SystemPromptPath}" VerticalAlignment="Center"/>
|
<TextBlock Grid.Row="0" Grid.Column="1" Classes="path-mono" Text="{Binding Files.SystemPromptPath}" VerticalAlignment="Center"/>
|
||||||
<Button Classes="btn" Grid.Row="0" Grid.Column="2" Content="{loc:Tr settings.files.openInEditor}"
|
<Button Classes="btn" Grid.Row="0" Grid.Column="2" Content="{loc:Tr settings.files.openInEditor}"
|
||||||
@@ -190,10 +190,22 @@
|
|||||||
<TextBlock Grid.Row="1" Grid.Column="1" Classes="path-mono" Text="{Binding Files.PlanningPromptPath}" VerticalAlignment="Center"/>
|
<TextBlock Grid.Row="1" Grid.Column="1" Classes="path-mono" Text="{Binding Files.PlanningPromptPath}" VerticalAlignment="Center"/>
|
||||||
<Button Classes="btn" Grid.Row="1" Grid.Column="2" Content="{loc:Tr settings.files.openInEditor}"
|
<Button Classes="btn" Grid.Row="1" Grid.Column="2" Content="{loc:Tr settings.files.openInEditor}"
|
||||||
Command="{Binding Files.OpenPromptCommand}" CommandParameter="Planning"/>
|
Command="{Binding Files.OpenPromptCommand}" CommandParameter="Planning"/>
|
||||||
<TextBlock Grid.Row="2" Grid.Column="0" Classes="field-label" Text="{loc:Tr settings.files.agentPrompt}" VerticalAlignment="Center"/>
|
<TextBlock Grid.Row="2" Grid.Column="0" Classes="field-label" Text="{loc:Tr settings.files.planningInitialPrompt}" VerticalAlignment="Center"/>
|
||||||
<TextBlock Grid.Row="2" Grid.Column="1" Classes="path-mono" Text="{Binding Files.AgentPromptPath}" VerticalAlignment="Center"/>
|
<TextBlock Grid.Row="2" Grid.Column="1" Classes="path-mono" Text="{Binding Files.PlanningInitialPromptPath}" VerticalAlignment="Center"/>
|
||||||
<Button Classes="btn" Grid.Row="2" Grid.Column="2" Content="{loc:Tr settings.files.openInEditor}"
|
<Button Classes="btn" Grid.Row="2" Grid.Column="2" Content="{loc:Tr settings.files.openInEditor}"
|
||||||
Command="{Binding Files.OpenPromptCommand}" CommandParameter="Agent"/>
|
Command="{Binding Files.OpenPromptCommand}" CommandParameter="PlanningInitial"/>
|
||||||
|
<TextBlock Grid.Row="3" Grid.Column="0" Classes="field-label" Text="{loc:Tr settings.files.retryPrompt}" VerticalAlignment="Center"/>
|
||||||
|
<TextBlock Grid.Row="3" Grid.Column="1" Classes="path-mono" Text="{Binding Files.RetryPromptPath}" VerticalAlignment="Center"/>
|
||||||
|
<Button Classes="btn" Grid.Row="3" Grid.Column="2" Content="{loc:Tr settings.files.openInEditor}"
|
||||||
|
Command="{Binding Files.OpenPromptCommand}" CommandParameter="Retry"/>
|
||||||
|
<TextBlock Grid.Row="4" Grid.Column="0" Classes="field-label" Text="{loc:Tr settings.files.dailyPrepPrompt}" VerticalAlignment="Center"/>
|
||||||
|
<TextBlock Grid.Row="4" Grid.Column="1" Classes="path-mono" Text="{Binding Files.DailyPrepPromptPath}" VerticalAlignment="Center"/>
|
||||||
|
<Button Classes="btn" Grid.Row="4" Grid.Column="2" Content="{loc:Tr settings.files.openInEditor}"
|
||||||
|
Command="{Binding Files.OpenPromptCommand}" CommandParameter="DailyPrep"/>
|
||||||
|
<TextBlock Grid.Row="5" Grid.Column="0" Classes="field-label" Text="{loc:Tr settings.files.weeklyReportPrompt}" VerticalAlignment="Center"/>
|
||||||
|
<TextBlock Grid.Row="5" Grid.Column="1" Classes="path-mono" Text="{Binding Files.WeeklyReportPromptPath}" VerticalAlignment="Center"/>
|
||||||
|
<Button Classes="btn" Grid.Row="5" Grid.Column="2" Content="{loc:Tr settings.files.openInEditor}"
|
||||||
|
Command="{Binding Files.OpenPromptCommand}" CommandParameter="WeeklyReport"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<TextBlock Classes="meta" Text="{Binding Files.StatusMessage}"
|
<TextBlock Classes="meta" Text="{Binding Files.StatusMessage}"
|
||||||
|
|||||||
Reference in New Issue
Block a user