Skip to main content

Mountain/IPC/WindServiceHandlers/Navigation/
HistoryGetStack.rs

1#![allow(non_snake_case)]
2
3//! Snapshot of the entire navigation history as a `Vec<String>`.
4//! Used by the navigate-history quick-pick (Cmd+Alt+-) which
5//! lists every recently-visited file inline.
6
7use std::sync::Arc;
8
9use serde_json::Value;
10
11use crate::RunTime::ApplicationRunTime::ApplicationRunTime;
12
13pub async fn HistoryGetStack(RunTime:Arc<ApplicationRunTime>) -> Result<Value, String> {
14	let Stack = RunTime.Environment.ApplicationState.Feature.NavigationHistory.GetStack();
15	Ok(Value::Array(Stack.into_iter().map(Value::String).collect()))
16}