feat(tui): add yolo permission mode (#33279)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
This commit is contained in:
parent
ba41dadc91
commit
0a5bed2bc2
11 changed files with 133 additions and 36 deletions
|
|
@ -233,7 +233,14 @@ export const RunCommand = effectCmd({
|
|||
hidden: true,
|
||||
describe: "cap visible interactive replay to the newest N messages",
|
||||
})
|
||||
.option("dangerously-skip-permissions", {
|
||||
.option("interactive", {
|
||||
alias: ["i"],
|
||||
type: "boolean",
|
||||
describe: "run in direct interactive split-footer mode",
|
||||
default: false,
|
||||
})
|
||||
.option("auto", {
|
||||
alias: ["yolo", "dangerously-skip-permissions"],
|
||||
type: "boolean",
|
||||
describe: "auto-approve permissions that are not explicitly denied (dangerous!)",
|
||||
default: false,
|
||||
|
|
@ -780,7 +787,7 @@ export const RunCommand = effectCmd({
|
|||
const permission = event.properties
|
||||
if (permission.sessionID !== sessionID) continue
|
||||
|
||||
if (args["dangerously-skip-permissions"]) {
|
||||
if (args.auto) {
|
||||
await client.permission.reply({
|
||||
requestID: permission.id,
|
||||
reply: "once",
|
||||
|
|
@ -981,9 +988,12 @@ export async function runMini(input: MiniCommandInput) {
|
|||
variant: undefined,
|
||||
thinking: undefined,
|
||||
mini: true,
|
||||
interactive: false,
|
||||
replay: input.replay ?? true,
|
||||
"replay-limit": input.replayLimit,
|
||||
replayLimit: input.replayLimit,
|
||||
auto: false,
|
||||
yolo: false,
|
||||
"dangerously-skip-permissions": false,
|
||||
dangerouslySkipPermissions: false,
|
||||
demo: input.demo ?? false,
|
||||
|
|
|
|||
|
|
@ -105,6 +105,12 @@ export const TuiThreadCommand = cmd({
|
|||
type: "string",
|
||||
describe: "agent to use",
|
||||
})
|
||||
.option("auto", {
|
||||
alias: ["yolo", "dangerously-skip-permissions"],
|
||||
type: "boolean",
|
||||
describe: "auto-approve permissions that are not explicitly denied (dangerous!)",
|
||||
default: false,
|
||||
})
|
||||
.option("mini", {
|
||||
type: "boolean",
|
||||
describe: "start the minimal interactive interface",
|
||||
|
|
@ -272,6 +278,7 @@ export const TuiThreadCommand = cmd({
|
|||
model: args.model,
|
||||
prompt,
|
||||
fork: args.fork,
|
||||
auto: args.auto,
|
||||
},
|
||||
}),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue