Skip to content

Commit 1d714bc

Browse files
committed
とりあえずエラー修正
1 parent be134a1 commit 1d714bc

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

app/[docs_id]/section.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { useFile } from "../terminal/file";
1515

1616
// セクション内に埋め込まれているターミナルとファイルエディターの内容をSection側から取得できるよう、
1717
// Contextに保存する
18+
// TODO: C++では複数ファイルを実行する場合がありうるが、ここではfilenameを1つしか受け付けない想定になっている
1819
interface ISectionCodeContext {
1920
addReplOutput: (command: string, output: ReplOutput[]) => void;
2021
addFile: (filename: string) => void;

app/terminal/exec.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ export function ExecFile(props: ExecProps) {
108108
break;
109109
}
110110
}
111-
sectionContext?.setExecResult(props.filename!, outputs);
111+
// TODO: 1つのファイル名しか受け付けないところに無理やりコンマ区切りで全部のファイル名を突っ込んでいる
112+
sectionContext?.setExecResult(props.filenames.join(","), outputs);
112113
};
113114
break;
114115
default:

app/terminal/python/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default function PythonPage() {
2929
filename="main.py"
3030
initContent="print('hello, world!')"
3131
/>
32-
<ExecFile filename="main.py" language="python" content="" />
32+
<ExecFile filenames={["main.py"]} language="python" content="" />
3333
</div>
3434
);
3535
}

0 commit comments

Comments
 (0)