MCPcopy
hub / github.com/1Panel-dev/MaxKB / vote

Function vote

ui/src/api/chat/chat.ts:192–206  ·  view source on GitHub ↗
(
  chat_id,
  chat_record_id,
  vote_status,
  vote_reason,
  vote_other_content,
  loading,
)

Source from the content-addressed store, hash-verified

190 vote_other_content?: string,
191 loading?: Ref<boolean>,
192) => Promise<Result<boolean>> = (
193 chat_id,
194 chat_record_id,
195 vote_status,
196 vote_reason,
197 vote_other_content,
198 loading,
199) => {
200 const data = {
201 vote_status,
202 ...(vote_reason !== undefined && { vote_reason }),
203 ...(vote_other_content !== undefined && { vote_other_content }),
204 }
205 return put(`/vote/chat/${chat_id}/chat_record/${chat_record_id}`, data, undefined, loading)
206}
207const pageChat: (
208 current_page: number,
209 page_size: number,

Callers

nothing calls this directly

Calls 1

putFunction · 0.90

Tested by

no test coverage detected