diff --git a/packages/ui/client/composables/client/index.ts b/packages/ui/client/composables/client/index.ts index 96fc1a7cb419..257872c00061 100644 --- a/packages/ui/client/composables/client/index.ts +++ b/packages/ui/client/composables/client/index.ts @@ -42,9 +42,13 @@ export const client = (function createVitestClient() { } })() +function sort(a: File, b: File) { + return a.name.localeCompare(b.name) +} + export const config = shallowRef({} as any) export const status = ref('CONNECTING') -export const files = computed(() => client.state.getFiles()) +export const files = computed(() => client.state.getFiles().sort(sort)) export const current = computed(() => files.value.find(file => file.id === activeFileId.value)) export const currentLogs = computed(() => getTasks(current.value).map(i => i?.logs || []).flat() || [])