feat: restore Wolai workspace navigation and assets

This commit is contained in:
Agent Board
2026-07-15 23:12:15 +08:00
parent 31a160fcc5
commit 6f9c7d3b58
48 changed files with 6734 additions and 517 deletions
+13 -2
View File
@@ -1017,8 +1017,19 @@ fn render_recent_navigation_items(records: &[NavigationRecentRecord]) -> String
}
fn render_navigation_link(title: &str, href: &str, kind: &str, relative_path: &str) -> String {
let is_page = kind == "page";
let class_name = if is_page {
"mnote-navigation-page__item mnote-page-block-link"
} else {
"mnote-navigation-page__item"
};
let page_attributes = if is_page {
r#" data-area="page-block" data-block-type="page""#
} else {
""
};
format!(
r#"<a class="mnote-navigation-page__item" data-navigation-item-kind="{}" data-local-relative-path="{}" href="{}">{}</a>"#,
r#"<a class="{class_name}" data-navigation-item-kind="{}" data-local-relative-path="{}"{page_attributes} href="{}">{}</a>"#,
escape_html(kind),
escape_html(relative_path),
escape_html(href),
@@ -1079,7 +1090,7 @@ fn navigation_folder_href(root_uri: &str, relative_path: &str) -> String {
fn navigation_document_href(root_uri: &str, file_tree_scope: &str, document_id: &str) -> String {
let mut href = format!(
"/documents/{}?sourceKind=local_folder&rootUri={}&treeView=filetree",
"/documents/{}?sourceKind=local_folder&rootUri={}",
query_escape(document_id),
query_escape(root_uri)
);