Skip to main content

Mountain/IPC/WindServiceHandlers/Navigation/
HistoryGetStack.rs

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