mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-04 09:38:50 +01:00
* chore: replace violation cache accessors with enum * chore: fix test * chore(fileSchema): index timestamps * fix(ActionService): use encoding/caching strategy for handling assistant function character length limit * refactor(actions): async `domainParser` also resolve retrieved model (which is deployment name) to user-defined model * style(AssistantAction): add `whitespace-nowrap` for ellipsis * refactor(ActionService): if domain is less than or equal to encoded domain fixed length, return domain with replacement of separator * refactor(actions): use sessions/transactions for updating Assistant Action database records * chore: remove TTL from ENCODED_DOMAINS cache * refactor(domainParser): minor optimization and add tests * fix(spendTokens): use txData.user for token usage logging * refactor(actions): add helper function `withSession` for database operations with sessions/transactions * fix(PluginsClient): logger debug `message` field edge case
33 lines
916 B
TypeScript
33 lines
916 B
TypeScript
import type { Action } from 'librechat-data-provider';
|
|
import GearIcon from '~/components/svg/GearIcon';
|
|
|
|
export default function AssistantAction({
|
|
action,
|
|
onClick,
|
|
}: {
|
|
action: Action;
|
|
onClick: () => void;
|
|
}) {
|
|
return (
|
|
<div>
|
|
<div
|
|
onClick={onClick}
|
|
className="border-token-border-medium flex w-full rounded-lg border text-sm hover:cursor-pointer"
|
|
>
|
|
<div
|
|
className="h-9 grow whitespace-nowrap px-3 py-2"
|
|
style={{ textOverflow: 'ellipsis', wordBreak: 'break-all', overflow: 'hidden' }}
|
|
>
|
|
{action.metadata.domain}
|
|
</div>
|
|
<div className="w-px bg-gray-300 dark:bg-gray-600" />
|
|
<button
|
|
type="button"
|
|
className="flex h-9 w-9 min-w-9 items-center justify-center rounded-lg rounded-l-none"
|
|
>
|
|
<GearIcon className="icon-sm" />
|
|
</button>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|