mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-19 08:39:02 +03:00
chore(app): remove LSP section from session details (#61424)
This commit is contained in:
committed by
GitHub
Unverified
parent
e387bde030
commit
79c80c7ca2
@@ -33,7 +33,6 @@ for (const scheme of ["light", "dark"] as const) {
|
||||
["MCP", "No MCP servers configured"],
|
||||
["Plugins", "No plugins configured"],
|
||||
["Skills", "No skills configured"],
|
||||
["LSP", "No LSP servers configured"],
|
||||
]) {
|
||||
const trigger = details.getByRole("button", { name, exact: true })
|
||||
await trigger.click()
|
||||
@@ -118,11 +117,6 @@ test("mobile plugin drawers keep configured lists, retry, refresh, and MCP statu
|
||||
},
|
||||
}),
|
||||
)
|
||||
await page.route(
|
||||
(url) => url.pathname === "/api/config",
|
||||
(route) =>
|
||||
route.fulfill({ json: [{ type: "document", info: { lsp: { "drawer-lsp": { command: ["drawer-lsp"] } } } }] }),
|
||||
)
|
||||
await page.route(
|
||||
(url) => url.pathname.startsWith("/api/mcp") || url.pathname.startsWith("/api/experimental/mcp"),
|
||||
(route) => {
|
||||
@@ -170,15 +164,10 @@ test("mobile plugin drawers keep configured lists, retry, refresh, and MCP statu
|
||||
await expect(plugins.getByText("extra-plugin", { exact: true })).toBeVisible()
|
||||
await plugins.getByRole("button", { name: "Navigate back", exact: true }).click()
|
||||
|
||||
for (const [name, item] of [
|
||||
["Skills", "drawer-skill"],
|
||||
["LSP", "drawer-lsp"],
|
||||
]) {
|
||||
await details.getByRole("button", { name, exact: true }).click()
|
||||
const plugin = page.getByRole("dialog", { name, exact: true })
|
||||
await expect(plugin.getByText(item, { exact: true })).toBeVisible()
|
||||
await plugin.getByRole("button", { name: "Navigate back", exact: true }).click()
|
||||
}
|
||||
await details.getByRole("button", { name: "Skills", exact: true }).click()
|
||||
const skills = page.getByRole("dialog", { name: "Skills", exact: true })
|
||||
await expect(skills.getByText("drawer-skill", { exact: true })).toBeVisible()
|
||||
await skills.getByRole("button", { name: "Navigate back", exact: true }).click()
|
||||
|
||||
await details.getByRole("button", { name: "MCP", exact: true }).click()
|
||||
const mcp = page.getByRole("dialog", { name: "MCP", exact: true })
|
||||
|
||||
@@ -322,7 +322,6 @@ for (const direction of ["ltr", "rtl"] as const) {
|
||||
for (const [name, empty] of [
|
||||
["Plugins", "No plugins configured"],
|
||||
["Skills", "No skills configured"],
|
||||
["LSP", "No LSP servers configured"],
|
||||
]) {
|
||||
await summary.getByRole("button", { name, exact: true }).click()
|
||||
await expect(page.getByRole("group", { name, exact: true }).getByText(empty, { exact: true })).toBeVisible()
|
||||
@@ -330,7 +329,7 @@ for (const direction of ["ltr", "rtl"] as const) {
|
||||
}
|
||||
|
||||
await page.keyboard.press("Escape")
|
||||
await expect(page.getByRole("group", { name: "LSP", exact: true })).toBeHidden()
|
||||
await expect(page.getByRole("group", { name: "Skills", exact: true })).toBeHidden()
|
||||
await page.keyboard.press("Escape")
|
||||
await expect(summary).toBeHidden()
|
||||
|
||||
@@ -345,19 +344,6 @@ test("summary catalogs load, refresh while cached, and tell errors from empty",
|
||||
const state = { fail: true, extra: false, empty: false }
|
||||
const pluginDirectories: string[] = []
|
||||
|
||||
const lsp = [
|
||||
{
|
||||
type: "document",
|
||||
info: {
|
||||
lsp: {
|
||||
typescript: { command: ["typescript-language-server", "--stdio"] },
|
||||
rust: { command: ["rust-analyzer"] },
|
||||
},
|
||||
},
|
||||
},
|
||||
{ type: "document", info: { lsp: { rust: { disabled: true } } } },
|
||||
]
|
||||
|
||||
await mockStressTimeline(page, {
|
||||
mcp: () => (state.empty ? [] : [{ name: "summary-mcp", status: { status: "connected" } }]),
|
||||
plugins: () =>
|
||||
@@ -395,7 +381,6 @@ test("summary catalogs load, refresh while cached, and tell errors from empty",
|
||||
{ id: "find-skills", name: "find-skills", path: "/skills/find/SKILL.md", content: "Find skills" },
|
||||
{ id: "review-animations", name: "review-animations", path: "/skills/review/SKILL.md", content: "Review" },
|
||||
],
|
||||
configEntries: lsp,
|
||||
})
|
||||
await page.route(
|
||||
(url) => url.pathname === "/api/plugin",
|
||||
@@ -449,10 +434,6 @@ test("summary catalogs load, refresh while cached, and tell errors from empty",
|
||||
await expect(menu("Skills").getByText("find-skills", { exact: true })).toBeVisible()
|
||||
await expect(menu("Skills").getByText("review-animations", { exact: true })).toBeVisible()
|
||||
await expect(menu("Plugins")).toBeHidden()
|
||||
await open("LSP")
|
||||
await expect(menu("LSP").getByText("typescript", { exact: true })).toBeVisible()
|
||||
await expect(menu("LSP").getByText("rust", { exact: true })).toHaveCount(0)
|
||||
await expect(menu("LSP").locator(".session-service-dot")).toHaveCount(0)
|
||||
await open("MCP")
|
||||
await expect(
|
||||
menu("MCP").locator('[data-slot="truncated-text-label"]').filter({ hasText: "summary-mcp" }),
|
||||
@@ -462,7 +443,6 @@ test("summary catalogs load, refresh while cached, and tell errors from empty",
|
||||
{ name: "MCP", path: "/api/mcp", item: "summary-mcp" },
|
||||
{ name: "Plugins", path: "/api/plugin", item: "supermemory" },
|
||||
{ name: "Skills", path: "/api/skill", item: "find-skills" },
|
||||
{ name: "LSP", path: "/api/config", item: "typescript" },
|
||||
]) {
|
||||
await expectRefreshKeeps(page, service.name, service.path, service.item)
|
||||
}
|
||||
@@ -472,13 +452,11 @@ test("summary catalogs load, refresh while cached, and tell errors from empty",
|
||||
await expect(menu("Plugins").getByText("daytona", { exact: true })).toBeVisible()
|
||||
|
||||
state.empty = true
|
||||
lsp.length = 0
|
||||
|
||||
for (const service of [
|
||||
{ name: "MCP", path: "/api/mcp", empty: "No MCP servers configured" },
|
||||
{ name: "Plugins", path: "/api/plugin", empty: "No plugins configured" },
|
||||
{ name: "Skills", path: "/api/skill", empty: "No skills configured" },
|
||||
{ name: "LSP", path: "/api/config", empty: "No LSP servers configured" },
|
||||
]) {
|
||||
await open(service.name)
|
||||
await expectRefreshKeeps(page, service.name, service.path, service.empty)
|
||||
@@ -781,7 +759,6 @@ test.describe("remote configuration", () => {
|
||||
{ type: "document", path: `${home}/mcp.jsonc`, info: { mcp: { servers: {} } } },
|
||||
{ type: "document", path: `${home}/plugins.json`, info: { plugins: [] } },
|
||||
{ type: "document", path: `${home}/skills.jsonc`, info: { skills: [] } },
|
||||
{ type: "document", path: `${home}/lsp.json`, info: { lsp: false } },
|
||||
{ type: "document", path: `${fixture.directory}/opencode.json`, info: {} },
|
||||
{ type: "document", path: `${fixture.directory}/.opencode/agents/review.md`, info: {} },
|
||||
]
|
||||
@@ -806,7 +783,6 @@ test.describe("remote configuration", () => {
|
||||
{ name: "MCP", path: `${home}/mcp.jsonc` },
|
||||
{ name: "Plugins", path: `${home}/plugins.json` },
|
||||
{ name: "Skills", path: `${home}/skills.jsonc` },
|
||||
{ name: "LSP", path: `${home}/lsp.json` },
|
||||
].entries()) {
|
||||
await trigger.click()
|
||||
const item = summary.getByRole("button", { name: service.name, exact: true })
|
||||
|
||||
@@ -18,14 +18,13 @@ test("a project file that sets a service without entries does not hide the globa
|
||||
{
|
||||
type: "document" as const,
|
||||
path: project,
|
||||
info: { mcp: {}, plugins: [], lsp: { zephyr: { command: ["zephyr"] } } },
|
||||
info: { mcp: {}, plugins: [] },
|
||||
},
|
||||
{ type: "document" as const, path: "/work/acme/.opencode/agents/review.md", info: {} },
|
||||
]
|
||||
|
||||
expect(serviceConfigFile(entries, "mcp")).toBe(global)
|
||||
expect(serviceConfigFile(entries, "plugins")).toBe(global)
|
||||
expect(serviceConfigFile(entries, "lsp")).toBe(project)
|
||||
// Nothing lists skills, so the first file, the global one, is where they would go.
|
||||
expect(serviceConfigFile(entries, "skills")).toBe(global)
|
||||
})
|
||||
@@ -33,11 +32,11 @@ test("a project file that sets a service without entries does not hide the globa
|
||||
test("a file that only sets a service still wins over one that never mentions it", () => {
|
||||
const entries = [
|
||||
{ type: "document" as const, path: global, info: {} },
|
||||
{ type: "document" as const, path: project, info: { lsp: false } },
|
||||
{ type: "document" as const, path: project, info: { mcp: {} } },
|
||||
]
|
||||
|
||||
expect(serviceConfigFile(entries, "lsp")).toBe(project)
|
||||
expect(serviceConfigFile([], "lsp")).toBeUndefined()
|
||||
expect(serviceConfigFile(entries, "mcp")).toBe(project)
|
||||
expect(serviceConfigFile([], "mcp")).toBeUndefined()
|
||||
})
|
||||
|
||||
test("setup sessions run in the global configuration's directory, never an ancestor project's", () => {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import type { ConfigEntry } from "@opencode/client"
|
||||
import { Predicate } from "effect"
|
||||
|
||||
type ConfigInfo = Extract<ConfigEntry, { type: "document" }>["info"]
|
||||
|
||||
@@ -7,7 +6,7 @@ type ConfigInfo = Extract<ConfigEntry, { type: "document" }>["info"]
|
||||
* The configuration file that holds a service's entries: the last one that lists any, else the last one that sets the
|
||||
* service, else the first. An empty `"mcp": {}` in a project file does not hide the servers the global file lists.
|
||||
*/
|
||||
export function serviceConfigFile(entries: readonly ConfigEntry[], service: "mcp" | "plugins" | "skills" | "lsp") {
|
||||
export function serviceConfigFile(entries: readonly ConfigEntry[], service: "mcp" | "plugins" | "skills") {
|
||||
const documents = configDocuments(entries)
|
||||
|
||||
return (
|
||||
@@ -37,11 +36,8 @@ function configDocuments(entries: readonly ConfigEntry[]) {
|
||||
)
|
||||
}
|
||||
|
||||
function lists(info: ConfigInfo, service: "mcp" | "plugins" | "skills" | "lsp") {
|
||||
function lists(info: ConfigInfo, service: "mcp" | "plugins" | "skills") {
|
||||
if (service === "mcp") return Object.keys(info.mcp?.servers ?? {}).length > 0
|
||||
|
||||
if (service === "lsp")
|
||||
return info.lsp !== undefined && !Predicate.isBoolean(info.lsp) && Object.keys(info.lsp).length > 0
|
||||
|
||||
return (info[service]?.length ?? 0) > 0
|
||||
}
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
import { expect, test } from "bun:test"
|
||||
import { configuredLsps } from "./configured-lsp"
|
||||
|
||||
test("lists configured LSP names with project overrides and no inferred built-ins", () => {
|
||||
expect(
|
||||
configuredLsps([
|
||||
{
|
||||
type: "document",
|
||||
info: {
|
||||
lsp: {
|
||||
typescript: { command: ["typescript-language-server", "--stdio"] },
|
||||
rust: { command: ["rust-analyzer"] },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "document",
|
||||
info: {
|
||||
lsp: {
|
||||
typescript: { disabled: true },
|
||||
eslint: { command: ["vscode-eslint-language-server", "--stdio"] },
|
||||
},
|
||||
},
|
||||
},
|
||||
]),
|
||||
).toEqual(["eslint", "rust"])
|
||||
expect(configuredLsps([{ type: "document", info: { lsp: true } }])).toEqual([])
|
||||
})
|
||||
|
||||
test("a later whole-LSP setting clears earlier names", () => {
|
||||
expect(
|
||||
configuredLsps([
|
||||
{ type: "document", info: { lsp: { rust: { command: ["rust-analyzer"] } } } },
|
||||
{ type: "document", info: { lsp: false } },
|
||||
{ type: "document", info: { lsp: { custom: { command: ["custom-lsp"] } } } },
|
||||
]),
|
||||
).toEqual(["custom"])
|
||||
})
|
||||
@@ -1,20 +0,0 @@
|
||||
import type { ConfigEntry } from "@opencode/client"
|
||||
import { Predicate } from "effect"
|
||||
|
||||
export function configuredLsps(entries: readonly ConfigEntry[]) {
|
||||
return entries
|
||||
.reduce<string[]>((names, entry) => {
|
||||
if (entry.type !== "document" || entry.info.lsp === undefined) return names
|
||||
const lsp = entry.info.lsp
|
||||
|
||||
if (Predicate.isBoolean(lsp)) return []
|
||||
|
||||
return [
|
||||
...names.filter((name) => !Object.hasOwn(lsp, name)),
|
||||
...Object.entries(lsp)
|
||||
.filter(([, server]) => !server.disabled)
|
||||
.map(([name]) => name),
|
||||
]
|
||||
}, [])
|
||||
.toSorted((a, b) => a.localeCompare(b))
|
||||
}
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "ምንም ተሰኪዎች አልተዋቀሩ",
|
||||
skills: "ችሎታ",
|
||||
"skills.empty": "ምንም ችሎታዎች አልተዋቀሩም",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "ምንም የLSP አገልጋዮች አልተዋቀሩም።",
|
||||
failed: "አልተሳካም",
|
||||
retry: "እንደገና ሞክር",
|
||||
connecting: "በመገናኘት ላይ ...",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "لم تُكوّن ملحقات",
|
||||
skills: "المهارات",
|
||||
"skills.empty": "لم تُكوّن مهارات",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "لم تُكوّن خوادم LSP",
|
||||
failed: "فشل",
|
||||
retry: "إعادة المحاولة",
|
||||
connecting: "جارٍ الاتصال…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Heç bir plagin qurulmayıb",
|
||||
skills: "Bacarıqlar",
|
||||
"skills.empty": "Heç bir bacarıq qurulmayıb",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Heç bir LSP serveri qurulmayıb",
|
||||
failed: "Uğursuz oldu",
|
||||
retry: "Təkrar cəhd et",
|
||||
connecting: "Qoşulur…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Няма конфигурирани добавки",
|
||||
skills: "Умения",
|
||||
"skills.empty": "Няма конфигурирани умения",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Няма конфигурирани LSP сървъри",
|
||||
failed: "Неуспешно",
|
||||
retry: "Повторен опит",
|
||||
connecting: "Свързване…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "কোনো প্লাগইন কনফিগার করা নেই",
|
||||
skills: "দক্ষতা",
|
||||
"skills.empty": "কোন দক্ষতা কনফিগার করা",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "কোনো LSP সার্ভার কনফিগার করা হয়নি৷",
|
||||
failed: "ব্যর্থ হয়েছে",
|
||||
retry: "আবার চেষ্টা করুন",
|
||||
connecting: "সংযোগ করা হচ্ছে...",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Nenhum plug-in configurado",
|
||||
skills: "Habilidades",
|
||||
"skills.empty": "Nenhuma habilidade configurada",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Nenhum servidor LSP configurado",
|
||||
failed: "Falha",
|
||||
retry: "Tentar novamente",
|
||||
connecting: "Conectando…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Nema konfiguriranih dodataka",
|
||||
skills: "Vještine",
|
||||
"skills.empty": "Nema konfiguriranih vještina",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Nema konfiguriranih LSP servera",
|
||||
failed: "Neuspješno",
|
||||
retry: "Pokušaj ponovo",
|
||||
connecting: "Povezivanje…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "No s'ha configurat cap connector",
|
||||
skills: "Habilitats",
|
||||
"skills.empty": "No s'ha configurat cap habilitat",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "No s'ha configurat cap servidor LSP",
|
||||
failed: "Ha fallat",
|
||||
retry: "Torna-ho a provar",
|
||||
connecting: "S'està connectant…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Nejsou nakonfigurovány žádné zásuvné moduly",
|
||||
skills: "Dovednosti",
|
||||
"skills.empty": "Nejsou nakonfigurovány žádné dovednosti",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Nejsou nakonfigurovány žádné servery LSP",
|
||||
failed: "Nezdařilo se",
|
||||
retry: "Zkusit znovu",
|
||||
connecting: "Připojování…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Ingen plugins konfigureret",
|
||||
skills: "Færdigheder",
|
||||
"skills.empty": "Ingen færdigheder konfigureret",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Ingen LSP-servere konfigureret",
|
||||
failed: "Mislykkedes",
|
||||
retry: "Prøv igen",
|
||||
connecting: "Opretter forbindelse...",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Keine Plugins konfiguriert",
|
||||
skills: "Fähigkeiten",
|
||||
"skills.empty": "Keine Fähigkeiten konfiguriert",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Keine LSP-Server konfiguriert",
|
||||
failed: "Fehlgeschlagen",
|
||||
retry: "Versuchen Sie es noch einmal",
|
||||
connecting: "Verbinden…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "ޕްލަގިންސް ކޮންފިގްރޭޓް ކުރެވިފައެއް ނުވެއެވެ",
|
||||
skills: "ހުނަރުތައް",
|
||||
"skills.empty": "އެއްވެސް ހުނަރެއް ކޮންފިގްރޭޓް ކުރެވިފައެއް ނުވެއެވެ",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "LSP ސަރވަރ ކޮންފިގްރޭޓް ކުރެވިފައެއް ނުވެއެވެ",
|
||||
failed: "ފެއިލްވުން",
|
||||
retry: "އަލުން މަސައްކަތް ކުރާށެވެ",
|
||||
connecting: "ގުޅުވައިގެން...",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "པ་ལག་ཨིན་ཚུ་རིམ་སྒྲིག་མ་འབད་བས།",
|
||||
skills: "རིག་རྩལ།",
|
||||
"skills.empty": "རིག་རྩལ་རིམ་སྒྲིག་མ་འབད་བས།",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "LSP སར་བར་ཚུ་རིམ་སྒྲིག་མ་འབད་བས།",
|
||||
failed: "འཐུས་ཤོར་བྱུང་ཡོདཔ།",
|
||||
retry: "བསྐྱར་དུ་ཚོད་ལྟ་",
|
||||
connecting: "མཐུད་པའི་...",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Δεν έχουν ρυθμιστεί πρόσθετα",
|
||||
skills: "Δεξιότητες",
|
||||
"skills.empty": "Δεν έχουν διαμορφωθεί δεξιότητες",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Δεν έχουν διαμορφωθεί διακομιστές LSP",
|
||||
failed: "Απέτυχε",
|
||||
retry: "Επανάληψη",
|
||||
connecting: "Σύνδεση…",
|
||||
|
||||
@@ -14,8 +14,6 @@ export default {
|
||||
"plugins.empty": "No plugins configured",
|
||||
skills: "Skills",
|
||||
"skills.empty": "No skills configured",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "No LSP servers configured",
|
||||
failed: "Failed",
|
||||
retry: "Retry",
|
||||
connecting: "Connecting…",
|
||||
@@ -32,9 +30,6 @@ export default {
|
||||
"setup.skills": "New skill with OpenCode",
|
||||
"setup.skills.prompt":
|
||||
"Help me write a new OpenCode skill in my global config. Ask me what it should teach you, then write its SKILL.md.",
|
||||
"setup.lsp": "Set up with OpenCode",
|
||||
"setup.lsp.prompt":
|
||||
"Help me configure a language server in my global OpenCode config. Ask me which language I work in, then set it up.",
|
||||
loadingChanges: "Loading changes…",
|
||||
noChanges: "No changes",
|
||||
basedOn: "Based on {{branch}}",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "No hay complementos configurados",
|
||||
skills: "Habilidades",
|
||||
"skills.empty": "No hay habilidades configuradas",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "No hay servidores LSP configurados",
|
||||
failed: "Fallido",
|
||||
retry: "Reintentar",
|
||||
connecting: "Conectando…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Ühtegi pluginat pole seadistatud",
|
||||
skills: "Oskused",
|
||||
"skills.empty": "Oskusi pole konfigureeritud",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "LSP servereid pole konfigureeritud",
|
||||
failed: "Ebaõnnestunud",
|
||||
retry: "Proovi uuesti",
|
||||
connecting: "Ühendamine…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "هیچ افزونهای پیکربندی نشده است",
|
||||
skills: "مهارتها",
|
||||
"skills.empty": "هیچ مهارتی پیکربندی نشده است",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "هیچ سرور LSPای پیکربندی نشده است",
|
||||
failed: "ناموفق",
|
||||
retry: "تلاش دوباره",
|
||||
connecting: "در حال اتصال…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Mitään laajennuksia ei ole määritetty",
|
||||
skills: "Taidot",
|
||||
"skills.empty": "Ei määritettyjä taitoja",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "LSP-palvelimia ei ole määritetty",
|
||||
failed: "Epäonnistui",
|
||||
retry: "Yritä uudelleen",
|
||||
connecting: "Yhdistetään…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Eingi tilskot uppsett",
|
||||
skills: "Førleikar",
|
||||
"skills.empty": "Eingin førleiki er uppsettur",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Eingin LSP ambætari er uppsettur",
|
||||
failed: "Mistókst",
|
||||
retry: "Royn aftur",
|
||||
connecting: "Samband...",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Aucun plugin configuré",
|
||||
skills: "Compétences",
|
||||
"skills.empty": "Aucune compétence configurée",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Aucun serveur LSP configuré",
|
||||
failed: "Échec",
|
||||
retry: "Réessayer",
|
||||
connecting: "Connexion…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "לא הוגדרו תוספים",
|
||||
skills: "מיומנויות",
|
||||
"skills.empty": "לא הוגדרו מיומנויות",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "לא הוגדרו שרתי LSP",
|
||||
failed: "נכשל",
|
||||
retry: "ניסיון חוזר",
|
||||
connecting: "מתחבר…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "कोई प्लगइन्स कॉन्फ़िगर नहीं किया गया",
|
||||
skills: "कौशल",
|
||||
"skills.empty": "कोई कौशल कॉन्फ़िगर नहीं किया गया",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "कोई LSP सर्वर कॉन्फ़िगर नहीं किया गया",
|
||||
failed: "असफल",
|
||||
retry: "पुन: प्रयास करें",
|
||||
connecting: "कनेक्ट हो रहा है...",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Nema konfiguriranih dodataka",
|
||||
skills: "Vještine",
|
||||
"skills.empty": "Nema konfiguriranih vještina",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Nema konfiguriranih LSP poslužitelja",
|
||||
failed: "Neuspješno",
|
||||
retry: "Pokušaj ponovno",
|
||||
connecting: "Povezivanje…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Nincsenek beállítva bővítmények",
|
||||
skills: "Készségek",
|
||||
"skills.empty": "Nincsenek konfigurálva készségek",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Nincs konfigurálva LSP szerver",
|
||||
failed: "Sikertelen",
|
||||
retry: "Próbálja újra",
|
||||
connecting: "Csatlakozás…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Պլագիններ չեն կոնֆիգուրացված",
|
||||
skills: "Հմտություններ",
|
||||
"skills.empty": "Ունակություններ չեն կոնֆիգուրացված",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "LSP սերվերներ չեն կոնֆիգուրացված",
|
||||
failed: "Վստահեցումը ձախողվեց",
|
||||
retry: "Փորձել կրկին",
|
||||
connecting: "Կապվում է…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Tidak ada plugin yang dikonfigurasi",
|
||||
skills: "Keahlian",
|
||||
"skills.empty": "Tidak ada keahlian yang dikonfigurasi",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Tidak ada server LSP yang dikonfigurasi",
|
||||
failed: "Gagal",
|
||||
retry: "Coba lagi",
|
||||
connecting: "Menyambungkan…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Engar viðbætur stilltar",
|
||||
skills: "Færni",
|
||||
"skills.empty": "Engin færni stillt",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Engir LSP netþjónar stilltir",
|
||||
failed: "Mistókst",
|
||||
retry: "Reyndu aftur",
|
||||
connecting: "Tengist…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Nessun plugin configurato",
|
||||
skills: "Abilità",
|
||||
"skills.empty": "Nessuna competenza configurata",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Nessun server LSP configurato",
|
||||
failed: "Fallito",
|
||||
retry: "Riprova",
|
||||
connecting: "Connessione…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "プラグインが設定されていません",
|
||||
skills: "スキル",
|
||||
"skills.empty": "スキルが設定されていません",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "LSPサーバーが設定されていません",
|
||||
failed: "失敗",
|
||||
retry: "再試行",
|
||||
connecting: "接続中…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "პლაგინები არაა კონფიგურებული",
|
||||
skills: "უნარები",
|
||||
"skills.empty": "უნარები არაა კონფიგურებული",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "LSP სერვერები არაა კონფიგურირებული",
|
||||
failed: "ტექნიკური წარუმატებელი",
|
||||
retry: "ხელახლა სცადეთ",
|
||||
connecting: "კავშირზე…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "មិនមានផ្លាតថ្ន័ណាមួយត្រូវបានកំណត់",
|
||||
skills: "ជំនាញ",
|
||||
"skills.empty": "មិនមានជំនាញដែលបានកំណត់ទេ",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "មិនមានម៉ាស៊ីនមេ LSP ត្រូវបានកំណត់ទេ",
|
||||
failed: "បរាជ័យ",
|
||||
retry: "សាកលើកម្តងទៀត",
|
||||
connecting: "កំពុងភ្ជាប់…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "구성된 플러그인이 없습니다",
|
||||
skills: "스킬",
|
||||
"skills.empty": "설정된 스킬이 없습니다",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "설정된 LSP 서버가 없습니다",
|
||||
failed: "실패",
|
||||
retry: "재시도",
|
||||
connecting: "연결 중…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "ບໍ່ມີການຕັ້ງຄ່າປລັກອິນ",
|
||||
skills: "ທັກສະ",
|
||||
"skills.empty": "ບໍ່ມີການຕັ້ງຄ່າທັກສະ",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "ບໍ່ມີການຕັ້ງຄ່າເຊີບເວີ LSP",
|
||||
failed: "ລົ້ມເຫຼວ",
|
||||
retry: "ລອງໃໝ່",
|
||||
connecting: "ກໍາລັງເຊື່ອມຕໍ່...",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Nėra sukonfigūruotų papildinių",
|
||||
skills: "Įgūdžiai",
|
||||
"skills.empty": "Įgūdžiai nesukonfigūruoti",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Nekonfigūruota jokių LSP serverių",
|
||||
failed: "Nepavyko",
|
||||
retry: "Bandyti dar kartą",
|
||||
connecting: "Jungiamasi…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Nav konfigurēts neviens spraudnis",
|
||||
skills: "Prasmes",
|
||||
"skills.empty": "Nav konfigurētu prasmju",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Nav konfigurēts neviens LSP serveris",
|
||||
failed: "Neizdevās",
|
||||
retry: "Mēģināt vēlreiz",
|
||||
connecting: "Notiek savienošana…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Не се конфигурирани приклучоци",
|
||||
skills: "Вештини",
|
||||
"skills.empty": "Не се конфигурирани вештини",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Не се конфигурирани LSP сервери",
|
||||
failed: "Неуспешно",
|
||||
retry: "Обиди повторно",
|
||||
connecting: "Се поврзува…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Плагинууд тохируулагдаагүй",
|
||||
skills: "Чадварууд",
|
||||
"skills.empty": "Шуурхай ур чадвар тохируулагдаагүй",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "LSP серверүүд тохируулагдаагүй",
|
||||
failed: "Амжилтгүй болсон",
|
||||
retry: "Дахин оролдох",
|
||||
connecting: "Холбож байна…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Tiada plugin dikonfigurasikan",
|
||||
skills: "Kemahiran",
|
||||
"skills.empty": "Tiada kemahiran dikonfigurasikan",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Tiada pelayan LSP dikonfigurasikan",
|
||||
failed: "Gagal",
|
||||
retry: "Cuba semula",
|
||||
connecting: "Menyambung…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "ပလပ်အင်များ မသတ်မှတ်ထားပါ",
|
||||
skills: "ကျွမ်းကျင်မှုများ",
|
||||
"skills.empty": "ကျွမ်းကျင်မှုများမသတ်မှတ်ထားပါ",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "LSP ဆာဗာများ မသတ်မှတ်ထားပါ",
|
||||
failed: "မအောင်မြင်ပါ",
|
||||
retry: "ထပ်ကြိုးစားပါ",
|
||||
connecting: "ဆက်သွယ်နေသည်…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "कुनै प्लगइनहरू कन्फिगर गरिएको छैन",
|
||||
skills: "सीपहरू",
|
||||
"skills.empty": "कुनै सीपहरू कन्फिगर गरिएको छैन",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "कुनै LSP सर्भरहरू कन्फिगर गरिएको छैन",
|
||||
failed: "असफल",
|
||||
retry: "पुन: प्रयास गर्नुहोस्",
|
||||
connecting: "जडान गर्दै...",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Geen plug-ins geconfigureerd",
|
||||
skills: "Vaardigheden",
|
||||
"skills.empty": "Geen vaardigheden geconfigureerd",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Geen LSP-servers geconfigureerd",
|
||||
failed: "Mislukt",
|
||||
retry: "Opnieuw proberen",
|
||||
connecting: "Verbinden…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Ingen plugins er konfigurert",
|
||||
skills: "Ferdigheter",
|
||||
"skills.empty": "Ingen ferdigheter konfigurert",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Ingen LSP-servere er konfigurert",
|
||||
failed: "Mislyktes",
|
||||
retry: "Prøv på nytt",
|
||||
connecting: "Kobler til …",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "کوئی پلگ ان کنفیگر نئیں اے۔",
|
||||
skills: "ہنر",
|
||||
"skills.empty": "کوئی ہنر ترتیب نئیں دیا گیا اے۔",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "کوئی LSP سرورز کنفیگر نئیں ہوئے۔",
|
||||
failed: "ناکام",
|
||||
retry: "دوبارہ کوشش کرو۔",
|
||||
connecting: "منسلک ہو رہا ہے…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Nie skonfigurowano żadnych wtyczek",
|
||||
skills: "Umiejętności",
|
||||
"skills.empty": "Nie skonfigurowano żadnych umiejętności",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Brak skonfigurowanych serwerów LSP",
|
||||
failed: "Nie powiodło się",
|
||||
retry: "Spróbuj ponownie",
|
||||
connecting: "Łączenie…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Nu au fost configurate pluginuri",
|
||||
skills: "Abilități",
|
||||
"skills.empty": "Nicio abilitate configurată",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Nu au fost configurate servere LSP",
|
||||
failed: "A eșuat",
|
||||
retry: "Reîncercați",
|
||||
connecting: "Se conectează…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Плагины не настроены",
|
||||
skills: "Навыки",
|
||||
"skills.empty": "Навыки не настроены",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "LSP-серверы не настроены",
|
||||
failed: "Не удалось",
|
||||
retry: "Повторить попытку",
|
||||
connecting: "Подключение…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "ප්ලගින වින්යාස කර නැත",
|
||||
skills: "කුසලතා",
|
||||
"skills.empty": "කුසලතා වින්යාස කර නැත",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "LSP සේවාදායක වින්යාස කර නැත",
|
||||
failed: "අසාර්ථකයි",
|
||||
retry: "නැවත උත්සාහ කරන්න",
|
||||
connecting: "සම්බන්ධ වෙමින්...",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Nie sú nakonfigurované žiadne pluginy",
|
||||
skills: "Schopnosti",
|
||||
"skills.empty": "Nie sú nakonfigurované žiadne schopnosti",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Nie sú nakonfigurované žiadne LSP servery",
|
||||
failed: "Zlyhalo",
|
||||
retry: "Skúsiť znova",
|
||||
connecting: "Pripájanie…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Brez konfiguriranih vtičnikov",
|
||||
skills: "Veščine",
|
||||
"skills.empty": "Brez konfiguriranih veščin",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Brez konfiguriranih LSP strežnikov",
|
||||
failed: "Ni uspelo",
|
||||
retry: "Poskusi znova",
|
||||
connecting: "Povezujem…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Asnjë shtojcë nuk është konfiguruar",
|
||||
skills: "Aftësitë",
|
||||
"skills.empty": "Nuk ka aftësi të konfiguruara",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Nuk ka serverë LSP të konfiguruar",
|
||||
failed: "Dështoi",
|
||||
retry: "Riprovo",
|
||||
connecting: "Po lidhet…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Нема конфигурисаних додатака",
|
||||
skills: "Вештине",
|
||||
"skills.empty": "Нема конфигурисаних вештина",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Нема конфигурисаних LSP сервера",
|
||||
failed: "Неуспешно",
|
||||
retry: "Покушај поново",
|
||||
connecting: "Повезивање…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Inga plugins konfigurerade",
|
||||
skills: "Färdigheter",
|
||||
"skills.empty": "Inga färdigheter konfigurerade",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Inga LSP-servrar har konfigurerats",
|
||||
failed: "Misslyckades",
|
||||
retry: "Försök igen",
|
||||
connecting: "Ansluter...",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Ягон плагинҳо танзим карда нашудаанд",
|
||||
skills: "Маҳорат",
|
||||
"skills.empty": "Ягон малака танзим карда нашудааст",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Ҳеҷ сервери LSP танзим нашудааст",
|
||||
failed: "Муваффақ шуд",
|
||||
retry: "Аз нав кӯшиш кунед",
|
||||
connecting: "Пайвастшавӣ…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "ยังไม่ได้กำหนดค่าปลั๊กอิน",
|
||||
skills: "ทักษะ",
|
||||
"skills.empty": "ยังไม่ได้ตั้งค่าทักษะ",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "ยังไม่ได้ตั้งค่าเซิร์ฟเวอร์ LSP",
|
||||
failed: "ล้มเหลว",
|
||||
retry: "ลองใหม่",
|
||||
connecting: "กำลังเชื่อมต่อ…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Hiç hili plugin düzülmedi",
|
||||
skills: "Ussatlyk",
|
||||
"skills.empty": "Hiç hili hünär düzülmedi",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "LSP serwerleri düzülmedi",
|
||||
failed: "Şowsuz",
|
||||
retry: "Gaýtadan synanyşyň",
|
||||
connecting: "Birikmek…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Hiçbir eklenti yapılandırılmadı",
|
||||
skills: "Beceriler",
|
||||
"skills.empty": "Hiçbir beceri yapılandırılmadı",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Hiçbir LSP sunucusu yapılandırılmadı",
|
||||
failed: "Başarısız",
|
||||
retry: "Yeniden dene",
|
||||
connecting: "Bağlanıyor…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Не налаштовано плагінів",
|
||||
skills: "Навички",
|
||||
"skills.empty": "Не налаштовано навичок",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Не налаштовано серверів LSP",
|
||||
failed: "Не вдалося",
|
||||
retry: "Повторити",
|
||||
connecting: "Підключення…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "کوئی پلگ ان کنفیگر نہیں ہے۔",
|
||||
skills: "ہنر",
|
||||
"skills.empty": "کوئی ہنر ترتیب نہیں دیا گیا ہے۔",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "کوئی LSP سرورز کنفیگر نہیں ہوئے۔",
|
||||
failed: "ناکام",
|
||||
retry: "دوبارہ کوشش کریں۔",
|
||||
connecting: "منسلک ہو رہا ہے…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Hech qanday plagin sozlanmagan",
|
||||
skills: "Ko'nikmalar",
|
||||
"skills.empty": "Hech qanday mahorat sozlanmagan",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Hech qanday LSP serveri sozlanmagan",
|
||||
failed: "Muvaffaqiyatsiz",
|
||||
retry: "Qayta urinish",
|
||||
connecting: "Ulanmoqda…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "Chưa cấu hình tiện ích nào",
|
||||
skills: "Kỹ năng",
|
||||
"skills.empty": "Chưa cấu hình kỹ năng nào",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "Chưa cấu hình máy chủ LSP nào",
|
||||
failed: "Thất bại",
|
||||
retry: "Thử lại",
|
||||
connecting: "Đang kết nối…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "未配置插件",
|
||||
skills: "技能",
|
||||
"skills.empty": "未配置技能",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "未配置 LSP 服务器",
|
||||
failed: "失败",
|
||||
retry: "重试",
|
||||
connecting: "正在连接…",
|
||||
|
||||
@@ -13,8 +13,6 @@ export default {
|
||||
"plugins.empty": "尚未設定任何外掛程式",
|
||||
skills: "技能",
|
||||
"skills.empty": "未設定技能",
|
||||
lsp: "LSP",
|
||||
"lsp.empty": "未設定 LSP 伺服器",
|
||||
failed: "失敗",
|
||||
retry: "重試",
|
||||
connecting: "連線中…",
|
||||
|
||||
@@ -25,7 +25,6 @@ import {
|
||||
import { createStore } from "solid-js/store"
|
||||
import { createKeyed, useDrawer, usePlugin, type MountedSession } from "@opencode/plugin/gui"
|
||||
import { globalConfigDirectory, serviceConfigFile } from "./config-file"
|
||||
import { configuredLsps } from "./configured-lsp"
|
||||
import { builtinContext } from "@opencode/plugin/gui/builtin"
|
||||
import { createFlyoutMotion } from "./flyout-motion"
|
||||
|
||||
@@ -33,7 +32,6 @@ const services = [
|
||||
{ type: "mcp", icon: "mcp", label: "mcp" },
|
||||
{ type: "plugins", icon: "cube", label: "plugins" },
|
||||
{ type: "skills", icon: "graduation-cap", label: "skills" },
|
||||
{ type: "lsp", icon: "code-slash", label: "lsp" },
|
||||
] as const
|
||||
|
||||
type Service = (typeof services)[number]["type"]
|
||||
@@ -130,7 +128,6 @@ function ServiceMenu(props: ServiceProps & { mobile?: boolean; name: string }) {
|
||||
mcp: useMcp(props, () => close()),
|
||||
plugins: useCatalog(props, "plugins"),
|
||||
skills: useCatalog(props, "skills"),
|
||||
lsp: useLsp(props),
|
||||
}
|
||||
|
||||
const active = () => {
|
||||
@@ -494,69 +491,6 @@ function ServiceMenu(props: ServiceProps & { mobile?: boolean; name: string }) {
|
||||
)
|
||||
}
|
||||
|
||||
function useLsp(props: ServiceProps): ServiceSource {
|
||||
const ctx = usePlugin()
|
||||
const data = () => props.session.server.data
|
||||
|
||||
const [load, { refetch }] = createResource(
|
||||
() => props.shown && data(),
|
||||
(current) => {
|
||||
const directory = props.directory
|
||||
|
||||
current.location.config.invalidate({ directory })
|
||||
|
||||
return current.location.config.sync({ directory })
|
||||
},
|
||||
)
|
||||
|
||||
const names = createMemo(() => configuredLsps(data().location.config.list({ directory: props.directory }) ?? []))
|
||||
|
||||
createKeyed(data, (current) =>
|
||||
onCleanup(
|
||||
current.on("config.updated", (event) => {
|
||||
if (event.location?.directory !== props.directory) return
|
||||
void refetch()
|
||||
}),
|
||||
),
|
||||
)
|
||||
|
||||
return {
|
||||
get loading() {
|
||||
return load.loading
|
||||
},
|
||||
get ready() {
|
||||
return data().location.config.list({ directory: props.directory }) !== undefined
|
||||
},
|
||||
get error() {
|
||||
return !!load.error
|
||||
},
|
||||
get count() {
|
||||
return names().length
|
||||
},
|
||||
failed: false,
|
||||
retry: () => void refetch(),
|
||||
Body: () => (
|
||||
<Show when={names().length} fallback={<ServiceEmpty title={ctx.t("lsp.empty")} />}>
|
||||
<For each={names()}>
|
||||
{(name) => (
|
||||
<div class="session-service-row">
|
||||
<TruncatedText text={name} class="session-summary-label" />
|
||||
</div>
|
||||
)}
|
||||
</For>
|
||||
</Show>
|
||||
),
|
||||
Footer: () => (
|
||||
<Show when={names().length} fallback={<ServiceEmptyFooter owner={props} service="lsp" />}>
|
||||
<div class="session-service-footer">
|
||||
<span class="session-service-config-separator" role="separator" />
|
||||
<ServiceConfigLink owner={props} service="lsp" />
|
||||
</div>
|
||||
</Show>
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
function useMcp(props: ServiceProps, close: () => void): ServiceSource {
|
||||
const ctx = usePlugin()
|
||||
const data = () => props.session.server.data
|
||||
|
||||
Reference in New Issue
Block a user