Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2bf5913

Browse files
committed
task sidebar iframe: make it wider and add custom pathname
1 parent4d0fe20 commit2bf5913

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

‎site/src/pages/TaskPage/TaskAppIframe.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ type TaskAppIFrameProps = {
88
task:Task;
99
app:WorkspaceApp;
1010
active:boolean;
11+
pathname?:string;
1112
};
1213

1314
exportconstTaskAppIFrame:FC<TaskAppIFrameProps>=({
1415
task,
1516
app,
1617
active,
18+
pathname,
1719
})=>{
1820
constagent=task.workspace.latest_build.resources
1921
.flatMap((r)=>r.agents)
@@ -29,9 +31,14 @@ export const TaskAppIFrame: FC<TaskAppIFrameProps> = ({
2931
workspace:task.workspace,
3032
});
3133

34+
consturl=newURL(link.href);
35+
if(pathname){
36+
url.pathname=pathname;
37+
}
38+
3239
return(
3340
<iframe
34-
src={link.href}
41+
src={url.toString()}
3542
title={link.label}
3643
loading="eager"
3744
className={cn([active ?"block" :"hidden","w-full h-full border-0"])}

‎site/src/pages/TaskPage/TaskSidebar.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { cn } from "utils/cn";
2929
import{timeFrom}from"utils/time";
3030
import{truncateURI}from"utils/uri";
3131
import{TaskAppIFrame}from"./TaskAppIframe";
32-
import{AI_APP_CHAT_SLUG}from"./constants";
32+
import{AI_APP_CHAT_SLUG,AI_APP_CHAT_URL_PATHNAME}from"./constants";
3333

3434
typeTaskSidebarProps={
3535
task:Task;
@@ -49,7 +49,7 @@ export const TaskSidebar: FC<TaskSidebarProps> = ({ task }) => {
4949
"border-0 border-r border-solid border-border",
5050
],
5151
// We want to make the sidebar wider for chat apps
52-
chatApp ?"w-[440px]" :"w-[320px]",
52+
chatApp ?"w-[520px]" :"w-[320px]",
5353
])}
5454
>
5555
<headerclassName="border-0 border-b border-solid border-border p-4 pt-0">
@@ -105,7 +105,13 @@ export const TaskSidebar: FC<TaskSidebarProps> = ({ task }) => {
105105
</header>
106106

107107
{chatApp ?(
108-
<TaskAppIFrameactivekey={chatApp.id}app={chatApp}task={task}/>
108+
<TaskAppIFrame
109+
active
110+
key={chatApp.id}
111+
app={chatApp}
112+
task={task}
113+
pathname={AI_APP_CHAT_URL_PATHNAME}
114+
/>
109115
) :(
110116
<TaskStatusestask={task}/>
111117
)}

‎site/src/pages/TaskPage/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
exportconstAI_APP_CHAT_SLUG="claude-code-web";
2+
exportconstAI_APP_CHAT_URL_PATHNAME="/chat/embed";

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp