Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

368 B
Raw Blame
import { createLocalStorageState } from 'foxact/create-local-storage-state'

export const [useRecentEmojis, useRecentEmojisValue] = createLocalStorageState<string[]>(
  'dify-icon-picker-recent-emojis',
  [],
)

export function addRecentEmoji(recent: string[] | null, emoji: string) {
  return [emoji, ...(recent ?? []).filter((item) => item !== emoji)].slice(0, 9)
}