diff --git a/packages/ui/client/composables/client/index.ts b/packages/ui/client/composables/client/index.ts index c484711bc532..e05ee437b0e1 100644 --- a/packages/ui/client/composables/client/index.ts +++ b/packages/ui/client/composables/client/index.ts @@ -40,9 +40,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() || [])