MCPcopy Create free account
hub / github.com/aws/amazon-q-developer-cli / print_state_dump

Function print_state_dump

crates/chat-cli/src/cli/settings.rs:100–116  ·  view source on GitHub ↗

Print internal state table dump (hidden debug feature)

(os: &Os, format: OutputFormat)

Source from the content-addressed store, hash-verified

98
99/// Print internal state table dump (hidden debug feature)
100fn print_state_dump(os: &Os, format: OutputFormat) -> Result<()> {
101 let settings = os.database.get_all_entries()?;
102 match format {
103 OutputFormat::Plain => {
104 for (key, value) in settings {
105 println!("{key} = {value}");
106 }
107 },
108 OutputFormat::Json => {
109 println!("{}", serde_json::to_string(&settings)?);
110 },
111 OutputFormat::JsonPretty => {
112 println!("{}", serde_json::to_string_pretty(&settings)?);
113 },
114 }
115 Ok(())
116}
117
118/// Collect all settings with their metadata and current values
119fn collect_settings(os: &Os) -> Vec<SettingInfo> {

Callers 1

executeMethod · 0.85

Calls 1

get_all_entriesMethod · 0.80

Tested by

no test coverage detected