mirror of
https://git.mirrors.martin98.com/https://github.com/bytedance/deer-flow
synced 2025-08-19 22:09:08 +08:00
feat: enable mock specific files located in the public/mock
folder
This commit is contained in:
parent
e06fe34fe6
commit
e7871cf2bf
@ -74,10 +74,14 @@ async function* chatReplayStream(
|
|||||||
const urlParams = new URLSearchParams(window.location.search);
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
let replayFilePath = "";
|
let replayFilePath = "";
|
||||||
if (urlParams.has("mock")) {
|
if (urlParams.has("mock")) {
|
||||||
|
if (urlParams.get("mock")) {
|
||||||
|
replayFilePath = `/mock/${urlParams.get("mock")!}.txt`;
|
||||||
|
} else {
|
||||||
replayFilePath =
|
replayFilePath =
|
||||||
params.interrupt_feedback === "accepted"
|
params.interrupt_feedback === "accepted"
|
||||||
? "/mock/before-interrupt.txt"
|
? "/mock/before-interrupt.txt"
|
||||||
: "/mock/after-interrupt.txt";
|
: "/mock/after-interrupt.txt";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
const replayId = extractReplayIdFromSearchParams(window.location.search);
|
const replayId = extractReplayIdFromSearchParams(window.location.search);
|
||||||
if (replayId) {
|
if (replayId) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user