Phase 002: rebrand to hermes-ui and consolidate i18n to zh/en
Removes the ekko / hermes-web-ui branding from the whole tree and drops eight locale files, so the project presents one name and one language pair. Data compatibility is deliberate, not accidental: DB filenames, the JWT audience, and skill manifest ownership all still recognise their pre-rename values so existing deployments under ~/.hermes-web-ui keep working without a re-login or a re-injection. scripts/harness-check.mjs now scans for the legacy strings and fails the build on any new occurrence, with an explicit allow-list (and reasons) for the compatibility paths that must keep them.
This commit is contained in:
@@ -155,7 +155,7 @@ async function request(path, options = {}) {
|
||||
|
||||
function appendQuery(path, query) {
|
||||
if (!query || typeof query !== 'object' || Array.isArray(query)) return path
|
||||
const parsed = new URL(path, 'http://hermes-web-ui.local')
|
||||
const parsed = new URL(path, 'http://hermes-ui.local')
|
||||
for (const [key, value] of Object.entries(query)) {
|
||||
if (value == null) continue
|
||||
if (Array.isArray(value)) {
|
||||
@@ -227,7 +227,7 @@ function normalizeApiPath(path) {
|
||||
const raw = String(path || '').trim()
|
||||
if (!raw || !raw.startsWith('/') || raw.startsWith('//')) return null
|
||||
if (raw === '/v1' || raw.startsWith('/v1/')) return null
|
||||
const parsed = new URL(raw, 'http://hermes-web-ui.local')
|
||||
const parsed = new URL(raw, 'http://hermes-ui.local')
|
||||
const normalized = `${parsed.pathname}${parsed.search}`
|
||||
if (parsed.pathname === '/api/openapi.json') return normalized
|
||||
if (parsed.pathname === '/health') return normalized
|
||||
@@ -248,7 +248,7 @@ async function openApiDocument(options = {}) {
|
||||
}
|
||||
|
||||
function pathWithoutQuery(path) {
|
||||
return new URL(path, 'http://hermes-web-ui.local').pathname
|
||||
return new URL(path, 'http://hermes-ui.local').pathname
|
||||
}
|
||||
|
||||
function pathTemplateRegex(template) {
|
||||
@@ -273,7 +273,7 @@ function findOpenApiOperation(openapi, method, path) {
|
||||
}
|
||||
|
||||
function queryObjectFromPath(path, query) {
|
||||
const parsed = new URL(path, 'http://hermes-web-ui.local')
|
||||
const parsed = new URL(path, 'http://hermes-ui.local')
|
||||
const values = {}
|
||||
for (const [key, value] of parsed.searchParams.entries()) {
|
||||
if (values[key] === undefined) values[key] = value
|
||||
|
||||
Reference in New Issue
Block a user