Skip to content

Commit bfbd52d

Browse files
authored
re-add chat name (#1111)
1 parent 3961e0d commit bfbd52d

File tree

1 file changed

+22
-32
lines changed

1 file changed

+22
-32
lines changed

web/pages/Chat/ChatSettings.tsx

+22-32
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,7 @@ import Button from '../../shared/Button'
44
import Select from '../../shared/Select'
55
import PersonaAttributes, { fromAttrs, toAttrs } from '../../shared/PersonaAttributes'
66
import TextInput from '../../shared/TextInput'
7-
import {
8-
chatStore,
9-
msgStore,
10-
presetStore,
11-
scenarioStore,
12-
settingStore,
13-
userStore,
14-
} from '../../store'
7+
import { chatStore, msgStore, presetStore, scenarioStore, userStore } from '../../store'
158
import { FormLabel } from '../../shared/FormLabel'
169
import { defaultPresets, isDefaultPreset } from '/common/presets'
1710
import { Card, TitleCard } from '/web/shared/Card'
@@ -38,7 +31,6 @@ const ChatSettings: Component<{
3831
close: () => void
3932
footer: (children: any) => void
4033
}> = (props) => {
41-
const cfg = settingStore()
4234
const state = chatStore((s) => ({ chat: s.active?.chat, char: s.active?.char }))
4335
const [edit, setEdit] = createStore(getInitState(state.chat, state.char))
4436
const user = userStore()
@@ -245,29 +237,27 @@ const ChatSettings: Component<{
245237
</Card>
246238
</Show>
247239

248-
<Show when={cfg.flags.debug}>
249-
<Card>
250-
<TextInput
251-
class="text-sm"
252-
value={edit?.name || ''}
253-
onChange={(ev) => setEdit('name', ev.currentTarget.value)}
254-
label={
255-
<>
256-
Chat name{' '}
257-
<div
258-
onClick={() =>
259-
msgStore.chatQuery('Generate a name for this conversation', (msg) =>
260-
setEdit('name', msg)
261-
)
262-
}
263-
>
264-
<Wand />
265-
</div>
266-
</>
267-
}
268-
/>
269-
</Card>
270-
</Show>
240+
<Card>
241+
<TextInput
242+
class="text-sm"
243+
value={edit?.name || ''}
244+
onChange={(ev) => setEdit('name', ev.currentTarget.value)}
245+
label={
246+
<>
247+
Chat name{' '}
248+
<div
249+
onClick={() =>
250+
msgStore.chatQuery('Generate a name for this conversation', (msg) =>
251+
setEdit('name', msg)
252+
)
253+
}
254+
>
255+
<Wand />
256+
</div>
257+
</>
258+
}
259+
/>
260+
</Card>
271261

272262
<Card>
273263
<Toggle

0 commit comments

Comments
 (0)