mirror of
https://github.com/coleam00/bolt.new-any-llm
synced 2024-12-27 22:33:03 +00:00
Satisfy the linter
This commit is contained in:
parent
704aee4390
commit
985d4d3d5c
@ -1 +1 @@
|
|||||||
{ "commit": "6003c165ef9347d5a9f97ea711f84d37d65b5c0c" }
|
{ "commit": "704aee4390f420ce8032a1a0e2e76fb98b9ad566" }
|
||||||
|
@ -3,10 +3,10 @@ import { useCallback, useEffect, useState } from 'react';
|
|||||||
import { toast } from 'react-toastify';
|
import { toast } from 'react-toastify';
|
||||||
import {
|
import {
|
||||||
chatId as chatIdStore,
|
chatId as chatIdStore,
|
||||||
description as descriptionStore,
|
|
||||||
db,
|
db,
|
||||||
updateChatDescription,
|
description as descriptionStore,
|
||||||
getMessages,
|
getMessages,
|
||||||
|
updateChatDescription,
|
||||||
} from '~/lib/persistence';
|
} from '~/lib/persistence';
|
||||||
|
|
||||||
interface EditChatDescriptionOptions {
|
interface EditChatDescriptionOptions {
|
||||||
@ -92,6 +92,7 @@ export function useEditChatDescription({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const lengthValid = trimmedDesc.length > 0 && trimmedDesc.length <= 100;
|
const lengthValid = trimmedDesc.length > 0 && trimmedDesc.length <= 100;
|
||||||
|
|
||||||
// Allow letters, numbers, spaces, and common punctuation but exclude characters that could cause issues
|
// Allow letters, numbers, spaces, and common punctuation but exclude characters that could cause issues
|
||||||
const characterValid = /^[a-zA-Z0-9\s\-_.,!?()[\]{}'"]+$/.test(trimmedDesc);
|
const characterValid = /^[a-zA-Z0-9\s\-_.,!?()[\]{}'"]+$/.test(trimmedDesc);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user