mirror of
https://github.com/instructkr/claude-code.git
synced 2026-05-28 16:36:45 +00:00
fix(#714): add action:help to top-level help json, render_export_help_json, render_help_topic_json, and resume repl help json
This commit is contained in:
@@ -3986,7 +3986,9 @@ fn run_resume_command(
|
||||
SlashCommand::Help => Ok(ResumeCommandOutcome {
|
||||
session: session.clone(),
|
||||
message: Some(render_repl_help()),
|
||||
json: Some(serde_json::json!({ "kind": "help", "text": render_repl_help() })),
|
||||
json: Some(
|
||||
serde_json::json!({ "kind": "help", "action": "help", "status": "ok", "text": render_repl_help() }),
|
||||
),
|
||||
}),
|
||||
SlashCommand::Compact => {
|
||||
let result = runtime::trident::trident_compact_session(
|
||||
@@ -7231,6 +7233,7 @@ fn local_help_topic_command(topic: LocalHelpTopic) -> &'static str {
|
||||
fn render_export_help_json() -> serde_json::Value {
|
||||
json!({
|
||||
"kind": "help",
|
||||
"action": "help",
|
||||
"status": "ok",
|
||||
"topic": "export",
|
||||
"command": "export",
|
||||
@@ -7279,6 +7282,7 @@ fn render_help_topic_json(topic: LocalHelpTopic) -> serde_json::Value {
|
||||
|
||||
json!({
|
||||
"kind": "help",
|
||||
"action": "help",
|
||||
"status": "ok",
|
||||
"topic": local_help_topic_command(topic),
|
||||
"command": local_help_topic_command(topic),
|
||||
@@ -10615,6 +10619,7 @@ fn print_help(output_format: CliOutputFormat) -> Result<(), Box<dyn std::error::
|
||||
"{}",
|
||||
serde_json::to_string_pretty(&json!({
|
||||
"kind": "help",
|
||||
"action": "help",
|
||||
"status": "ok",
|
||||
"message": message,
|
||||
}))?
|
||||
|
||||
Reference in New Issue
Block a user