Fix: Added read-only mode support and optimized navigation logic #9869 (#10370)

### What problem does this PR solve?

Fix: Added read-only mode support and optimized navigation logic #9869

- Added the `isReadonly` property to the parseResult component to
control the enabled state of editing and interactive features
- Added the `navigateToDataFile` navigation method to navigate to the
data file details page
- Refactored the `navigateToDataflowResult` method to use an object
parameter to support more flexible query parameter configuration
- Unified the `var(--accent-primary)` CSS variable format to
`rgb(var(--accent-primary))` to accommodate more styling scenarios
- Extracted the parser initialization logic into a separate hook
(`useParserInit`)

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
chanx
2025-09-30 12:00:29 +08:00
committed by GitHub
parent fb19e24f8a
commit 4d6ff672eb
27 changed files with 468 additions and 253 deletions

View File

@ -1,3 +1,5 @@
import { PipelineResultSearchParams } from './constant';
interface ComponentParams {
debug_inputs: Record<string, any>;
delay_after_error: number;
@ -60,3 +62,19 @@ export interface IPipelineFileLogDetail {
update_date: string;
update_time: number;
}
export interface IChunk {
positions: number[][];
image_id: string;
text: string;
}
export interface NavigateToDataflowResultProps {
id: string;
[PipelineResultSearchParams.KnowledgeId]?: string;
[PipelineResultSearchParams.DocumentId]: string;
[PipelineResultSearchParams.AgentId]?: string;
[PipelineResultSearchParams.AgentTitle]?: string;
[PipelineResultSearchParams.IsReadOnly]?: string;
[PipelineResultSearchParams.Type]: string;
}