Skip to content

Commit 5905418

Browse files
committed
Implement forwarded state visualization for tasks and update the URL override field description
1 parent 30690cc commit 5905418

3 files changed

Lines changed: 11 additions & 4 deletions

File tree

‎packages/ui/src/components/editor/panel/Tasks/Tasks.module.scss‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
background-color: var(--vscode-list-hoverBackground);
2020
}
2121

22-
&--copied {
22+
&--forwarded {
2323
background-color: var(--vscode-list-inactiveSelectionBackground);
2424
}
2525

‎packages/ui/src/components/editor/panel/Tasks/Tasks.tsx‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import styles from './Tasks.module.scss'
2-
import React, { useState, useEffect, useRef, useMemo } from 'react'
2+
import React, { useState, useRef, useMemo } from 'react'
33
import dayjs from 'dayjs'
44
import relativeTime from 'dayjs/plugin/relativeTime'
55
import { SimpleCheckbox } from '../../common/SimpleCheckbox'
@@ -55,6 +55,9 @@ export const Tasks: React.FC<Props> = (props) => {
5555
const [editing_timestamp, set_editing_timestamp] = useState<number | null>(
5656
null
5757
)
58+
const [forwarded_timestamp, set_forwarded_timestamp] = useState<
59+
number | null
60+
>(null)
5861
const prevent_edit_ref = useRef(false)
5962

6063
use_auto_focus_new_task(props.tasks, set_editing_timestamp)
@@ -82,14 +85,17 @@ export const Tasks: React.FC<Props> = (props) => {
8285
}) => {
8386
const is_editing = editing_timestamp == params.task.created_at
8487
const has_children = params.task.children && params.task.children.length > 0
88+
const is_forwarded = forwarded_timestamp == params.task.created_at
8589

8690
const checked_children_count = has_children
8791
? params.task.children!.filter((child) => child.is_checked).length
8892
: 0
8993

9094
return (
9195
<div
92-
className={styles.item}
96+
className={cn(styles.item, {
97+
[styles['item--forwarded']]: is_forwarded
98+
})}
9399
style={{ paddingLeft: `${10 + params.depth * 20}px` }}
94100
>
95101
{[...Array(params.depth)].map((_, i) => (
@@ -160,6 +166,7 @@ export const Tasks: React.FC<Props> = (props) => {
160166
on_click={(e) => {
161167
e.stopPropagation()
162168
props.on_forward(params.task.text)
169+
set_forwarded_timestamp(params.task.created_at)
163170
}}
164171
title="Use"
165172
/>

‎packages/vscode/src/views/panel/frontend/components/edit-preset-form/EditPresetForm/EditPresetForm.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ export const EditPresetForm: React.FC<Props> = (props) => {
342342
<Field
343343
label={chatbot_config?.url_override_label || 'URL override'}
344344
html_for="new-url"
345-
info="Keep all related chats in one place."
345+
info="Use a smart workspace for your coding tasks."
346346
>
347347
<Input
348348
id="new-url"

0 commit comments

Comments
 (0)