Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
feat: 完成 analyze-watch 功能
Summary by CodeRabbit
新功能
getFoamTreeData
来处理chartData
。chartData
的条件。导出或公共实体声明的变更
client/index.tsx
中的function getFoamTreeData(chartData: any)
中添加了getFoamTreeData
函数来处理FoamTree的chartData
。配置更改
crates/mako/src/config/config.rs
的AnalyzeConfig
结构中添加了一个类型为Option<bool>
的新字段watch
。开发工具
crates/mako/src/dev/mod.rs
的DevServer
模块中进行了以下更改:crate::stats
中添加了一个新的导入语句create_stats_info
。handle_requests
方法中添加了一个新的compiler
声明。handle_websocket_stats_data
。生成分析
crates/mako/src/generate/analyze.rs
中,Analyze
结构体内的write_analyze
方法已更新,包括处理基于analyze.watch
配置的布尔标志is_watch
的逻辑。此外,html_str
生成现在在模板中包含is_watch
。crates/mako/src/generate/analyze.rs
的struct Analyze
中的pub fn write_analyze(stats: &StatsJsonMap, context: Arc<Context>) -> Result<()>
中:analyze.watch
配置的is_watch
的逻辑。html_str
生成以在模板中包含is_watch
。