Refact: sandbox quickstart.md & add tutorial for code exec component (#14786)

### What problem does this PR solve?

Refact: sandbox quickstart.md && add tutorial for code exec component

### Type of change

- [x] Refactoring


<img width="700" alt="img_v3_0211j_dcff835b-e3bb-4c77-9bc5-3b31a983229g"
src="https://github.com/user-attachments/assets/7842fc0f-639a-458f-b164-bc81a99ce4a5"
/>

---------

Co-authored-by: writinwaters <93570324+writinwaters@users.noreply.github.com>
This commit is contained in:
Magicbook1108
2026-05-12 14:42:20 +08:00
committed by GitHub
parent e8adc977bd
commit f85e18afbc
4 changed files with 125 additions and 8 deletions

View File

@@ -10,7 +10,7 @@ import { IModalProps } from '@/interfaces/common';
import { RAGFlowNodeType } from '@/interfaces/database/agent';
import { cn } from '@/lib/utils';
import { lowerFirst } from 'lodash';
import { CirclePlay, X } from 'lucide-react';
import { ArrowUpRight, CirclePlay, X } from 'lucide-react';
import { Operator } from '../constant';
import { AgentFormContext } from '../context';
import { RunTooltip } from '../flow-tooltip';
@@ -31,6 +31,8 @@ interface IProps {
}
const EmptyContent = () => <div></div>;
const SandboxQuickstartUrl =
'https://github.com/infiniflow/ragflow/blob/main/docs/guides/agent/agent_quickstarts/sandbox_quickstart.md';
const FormSheet = ({
visible,
@@ -100,6 +102,24 @@ const FormSheet = ({
{t(
`${lowerFirst(operatorName === Operator.Tool ? toolComponentName : operatorName)}Description`,
)}
{operatorName === Operator.Code && (
<Button
variant="ghost"
size="icon"
className="ml-1 inline-flex size-5 !p-0 align-middle bg-transparent"
type="button"
onClick={(e) => {
e.stopPropagation();
window.open(
SandboxQuickstartUrl,
'_blank',
'noopener,noreferrer',
);
}}
>
<ArrowUpRight className="size-4 cursor-pointer text-text-secondary" />
</Button>
)}
</p>
)}
</section>