File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import { Link as RouterLink } from "react-router-dom";
15
15
import { pageTitle } from "utils/page" ;
16
16
import { TaskApps } from "./TaskApps" ;
17
17
import { TaskSidebar } from "./TaskSidebar" ;
18
+ import { ellipsizeText } from "utils/ellipsizeText" ;
18
19
19
20
const TaskPage = ( ) => {
20
21
const { workspace : workspaceName , username } = useParams ( ) as {
@@ -163,7 +164,7 @@ const TaskPage = () => {
163
164
return (
164
165
< >
165
166
< Helmet >
166
- < title > { pageTitle ( task . prompt ) } </ title >
167
+ < title > { pageTitle ( ellipsizeText ( task . prompt , 64 ) ! ) } </ title >
167
168
</ Helmet >
168
169
169
170
< div className = "h-full flex justify-stretch" >
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ export const TaskSidebar: FC<TaskSidebarProps> = ({ task }) => {
97
97
</ DropdownMenu >
98
98
</ div >
99
99
100
- < h1 className = "m-0 mt-1 text-base font-medium" > { task . prompt } </ h1 >
100
+ < h1 className = "m-0 mt-1 text-base font-medium truncate " > { task . prompt } </ h1 >
101
101
102
102
{ task . workspace . latest_app_status ?. uri && (
103
103
< div className = "flex items-center gap-2 mt-2 flex-wrap" >
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ import TextareaAutosize from "react-textarea-autosize";
40
40
import { pageTitle } from "utils/page" ;
41
41
import { relativeTime } from "utils/time" ;
42
42
import { type UserOption , UsersCombobox } from "./UsersCombobox" ;
43
+ import { generateWorkspaceName } from "modules/workspaces/generateWorkspaceName" ;
43
44
44
45
type TasksFilter = {
45
46
user : UserOption | undefined ;
@@ -488,8 +489,9 @@ export const data = {
488
489
userId : string ,
489
490
templateId : string ,
490
491
) : Promise < Task > {
492
+
491
493
const workspace = await API . createWorkspace ( userId , {
492
- name : `task-${ new Date ( ) . getTime ( ) } ` ,
494
+ name : `task-${ generateWorkspaceName ( ) } ` ,
493
495
template_id : templateId ,
494
496
rich_parameter_values : [
495
497
{ name : AI_PROMPT_PARAMETER_NAME , value : prompt } ,
You can’t perform that action at this time.
0 commit comments