mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2026-02-20 15:15:15 +01:00
@@ -30,11 +30,27 @@ class AskAiCommand {
|
||||
required this.command,
|
||||
this.description = '',
|
||||
this.toolName,
|
||||
this.risk,
|
||||
this.needsConfirmation,
|
||||
this.why,
|
||||
this.prechecks,
|
||||
});
|
||||
|
||||
final String command;
|
||||
final String description;
|
||||
final String? toolName;
|
||||
|
||||
/// Optional risk hint returned by the model/tool, e.g. `low|medium|high`.
|
||||
final String? risk;
|
||||
|
||||
/// Optional explicit confirmation requirement returned by the model/tool.
|
||||
final bool? needsConfirmation;
|
||||
|
||||
/// Optional explanation for why this command is suggested.
|
||||
final String? why;
|
||||
|
||||
/// Optional pre-check commands / steps.
|
||||
final List<String>? prechecks;
|
||||
}
|
||||
|
||||
@immutable
|
||||
|
||||
@@ -8,7 +8,8 @@ enum ContainerMenu {
|
||||
restart,
|
||||
rm,
|
||||
logs,
|
||||
terminal
|
||||
terminal,
|
||||
askAi
|
||||
//stats,
|
||||
;
|
||||
|
||||
@@ -20,10 +21,11 @@ enum ContainerMenu {
|
||||
rm,
|
||||
logs,
|
||||
terminal,
|
||||
askAi,
|
||||
//stats,
|
||||
];
|
||||
}
|
||||
return [start, rm, logs];
|
||||
return [start, rm, logs, askAi];
|
||||
}
|
||||
|
||||
IconData get icon => switch (this) {
|
||||
@@ -33,6 +35,7 @@ enum ContainerMenu {
|
||||
ContainerMenu.rm => Icons.delete,
|
||||
ContainerMenu.logs => Icons.logo_dev,
|
||||
ContainerMenu.terminal => Icons.terminal,
|
||||
ContainerMenu.askAi => Icons.smart_toy_outlined,
|
||||
// DockerMenuType.stats => Icons.bar_chart,
|
||||
};
|
||||
|
||||
@@ -43,6 +46,7 @@ enum ContainerMenu {
|
||||
ContainerMenu.rm => libL10n.delete,
|
||||
ContainerMenu.logs => libL10n.log,
|
||||
ContainerMenu.terminal => l10n.terminal,
|
||||
ContainerMenu.askAi => l10n.askAi,
|
||||
// DockerMenuType.stats => s.stats,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user