[codex] add version preview workflow (#1086)

* add version preview workflow

* fix sidebar group test

* fix legacy usage schema migration
This commit is contained in:
ekko
2026-05-28 12:30:49 +08:00
committed by GitHub
parent 7997bfa2b7
commit 1734bac9b4
30 changed files with 1528 additions and 464 deletions
@@ -290,9 +290,9 @@ function buildWsUrl(): string {
return `${wsProtocol}//${new URL(base).host}/api/hermes/terminal${token ? `?token=${encodeURIComponent(token)}` : ""}`;
}
// Dev mode: connect directly to backend port; Production: same host
const host = import.meta.env.DEV
? formatHostForPort(location.hostname, 8648)
const directDevPort = import.meta.env.VITE_HERMES_DIRECT_WS_PORT;
const host = import.meta.env.DEV && directDevPort
? formatHostForPort(location.hostname, Number(directDevPort))
: location.host;
return `${wsProtocol}//${host}/api/hermes/terminal${token ? `?token=${encodeURIComponent(token)}` : ""}`;
}
@@ -0,0 +1,34 @@
<script setup lang="ts">
import { useI18n } from 'vue-i18n'
import GithubPreviewSettings from '@/components/hermes/settings/GithubPreviewSettings.vue'
const { t } = useI18n()
</script>
<template>
<div class="version-preview-view">
<header class="page-header">
<h2 class="header-title">{{ t('githubPreview.title') }}</h2>
</header>
<div class="page-content">
<GithubPreviewSettings />
</div>
</div>
</template>
<style scoped lang="scss">
@use "@/styles/variables" as *;
.version-preview-view {
height: calc(100 * var(--vh));
display: flex;
flex-direction: column;
}
.page-content {
flex: 1;
overflow-y: auto;
padding: 20px;
}
</style>