|
|
@@ -154,14 +154,14 @@ function wildcardDirectory(value: string) {
|
|
|
export function permissionAlwaysLines(input: { action: string; save?: ReadonlyArray<string> }): string[] {
|
|
|
const save = input.save ?? []
|
|
|
if (save.length === 1 && save[0] === "*") {
|
|
|
- return [`This will allow ${input.action} until OpenCode is restarted.`]
|
|
|
+ return [`This will always allow ${input.action} for this project.`]
|
|
|
}
|
|
|
- return ["This will allow the following patterns until OpenCode is restarted.", ...save.map((item) => `- ${item}`)]
|
|
|
+ return ["This will always allow the following patterns for this project.", ...save.map((item) => `- ${item}`)]
|
|
|
}
|
|
|
|
|
|
export function permissionOptionLabel(option: "once" | "always" | "reject" | "confirm" | "cancel") {
|
|
|
if (option === "once") return "Allow once"
|
|
|
- if (option === "always") return "Allow always"
|
|
|
+ if (option === "always") return "Always allow"
|
|
|
if (option === "reject") return "Reject"
|
|
|
if (option === "confirm") return "Confirm"
|
|
|
return "Cancel"
|