Download packages/transcript/src/model/ids.ts from SaylorTwift/kimi-code: direct link, hf CLI and curl.
- Browser
- Download file 877 Bytes
-
https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/transcript/src/model/ids.ts
- Command line
-
hf download hf://SaylorTwift/kimi-code/packages/transcript/src/model/ids.ts
-
curl -L -o ids.ts https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/transcript/src/model/ids.ts
877 Bytes
| export type TurnId = string; | |
| export type StepId = string; | |
| export type FrameId = string; | |
| export type MarkerId = string; | |
| export type TaskRefId = string; | |
| export type TaskId = string; | |
| export type AgentId = string; | |
| export type InteractionId = string; | |
| export type AttachmentId = string; | |
| export type TodoId = string; | |
| export type PromptId = string; | |
| export type ItemId = string; | |
| export function turnId(ordinal: number): TurnId { | |
| return `t${ordinal}`; | |
| } | |
| export function stepId(turn: TurnId, ordinal: number): StepId { | |
| return `${turn}.${ordinal}`; | |
| } | |
| export function frameId(step: StepId, ordinal: number): FrameId { | |
| return `${step}.f${ordinal}`; | |
| } | |
| export function compareTurnIds(a: TurnId, b: TurnId): number { | |
| return turnOrdinal(a) - turnOrdinal(b); | |
| } | |
| export function turnOrdinal(id: TurnId): number { | |
| const n = Number(id.slice(1)); | |
| return Number.isFinite(n) ? n : 0; | |
| } | |