Settings storage with scopes, and project setup that can live in the repository (#3413)
* refactor(settings): settings registry and intent-gated writes
Problem: every setting lived in a flat document with ten hand-maintained
key lists that had drifted (three keys the server silently dropped, five
it kept that nothing read), and three code paths wrote to the server
without a person changing anything: the theme persist effect on mount,
bootstrap seeding of server-missing keys, and the auto-save echoing
values just adopted from the server.
Approach: one registry (packages/ui/src/lib/settings/registry.ts) names
every key with its scope (instance / profile / device), a boundary parser
and its store binding; DesktopSettings, the sanitizer, the mirror, the
apply step and the auto-save derive from it. A generated JSON snapshot
carries the key list to the server and the VS Code bridge. Writes carry
intent: the theme context writes only from its user-facing setters, a
missing server key leaves the local store alone instead of resetting it,
updateDesktopSettings drops values the server already holds, and the
auto-savers treat values applied from the server as a new baseline.
Testing: bun test packages/ui (registry + persistence suites cover zero
writes on load, dedup, toggle-back cancellation, failed-save retry, and
snapshot freshness); tsc for every workspace.
* refactor(ui): read and write settings through the shared path only
Problem: fourteen pages and stores fetched /api/config/settings on their
own and re-parsed the raw document by hand, so the registry could not
guard them and two of them treated a failed load as an empty list.
Approach: loadDesktopSettings() and updateDesktopSettings() (which now
resolves { ok }) replace every direct call; SkillsCatalogPage and
AddCatalogDialog refuse to write the catalog list until it is known.
Testing: bun test packages/ui (403 files), eslint on the changed files.
* refactor(server): validate settings writes against the registry snapshot
Problem: the server whitelist was the only guard on PUT /api/config/settings
and had drifted from the client; dead keys were still persisted.
Approach: settings-helpers.js drops any key the generated registry
snapshot does not list as persistable and strips secret keys from
responses; the dead keys (markdownDisplayMode, toolCallExpansion,
typographySizes, expandedEditorToolbar, gitProviderId/gitModelId) are
gone; the profile keys that were client-only now round-trip. A drift
test requires a valid sample for every persistable registry key.
Testing: vitest run in packages/web (182 files), including the packed
tarball import.
* refactor(vscode): gate bridge settings writes by the registry
Problem: the extension host wrote any key the webview sent straight into
settings.json, and commit-message generation read the dead
gitProviderId/gitModelId pair instead of the small-model setting.
Approach: filterPersistableSettingsChanges applies the registry snapshot
before the file write; chooseBridgeGitGenerationModel honours
smallModelUseDefault/smallModelOverride ahead of the zen fallback.
Testing: bun test packages/vscode (37 files), tsc, build:extension.
* feat(settings): split the user's profile into preferences.json
Problem: one flat settings.json held instance facts, the user's
preferences and device state together, so device state travelled between
installs and the profile had no document of its own to sync from.
Approach: the server keeps one merged document for clients but routes
each key by registry scope on disk (settings-files.js): profile keys go to
preferences.json as { value, updatedAt } entries stamped when the value
changes, everything else stays in settings.json, device keys are dropped
from writes. A missing preferences.json is seeded once from settings.json,
which is left intact; an unreadable one is a failure that pauses profile
writes and never gets overwritten. Server modules that read a profile key
off the disk use the merged sync read. Electron main reads the theme mode
from both files and now owns the splash colours, handed over the
window-theme IPC instead of the settings document. Clients stop sending
device keys, seed them once from a pre-split document, and persist
inputBarOffset locally. The PWA manifest keys are instance facts.
Testing: vitest in packages/web (seed, split write, timestamp retention,
unreadable file), bun test in packages/ui and packages/electron, tsc for
every workspace.
* feat(vscode): write the profile to preferences.json from the extension host
Problem: the extension host writes the shared settings files directly and
had to follow the server's split, and its file writes reported success on
failure.
Approach: settings-files.ts mirrors the server's format and split rules
(seed once, unreadable preferences.json is a failure); persistSettings
routes profile keys to preferences.json and the rest to settings.json,
and the atomic writers now throw so a failed save reaches the webview.
Clearing a key now actually removes it from the owning file.
Testing: bun test packages/vscode (38 files), tsc, build:extension.
* feat(settings): store the per-surface profile fields by surface kind
Problem: theme, chat-layout switches and typography sizes are one value
for every client of an instance, so the phone and the desktop cannot
disagree without a hard-coded runtime branch.
Approach: every settings request carries the client's surface kind in the
x-openchamber-surface header (web, desktop, vscode, mobile — the phone app
and the hosted mobile shell are one kind). For the registry's perSurface
keys the store writes a changed value under fields[key].surfaces[kind] in
preferences.json and never touches the base from a surface; reads resolve
the kind's own value, then the base, then nothing. Writes without a
surface (migrations, the seed) set the base. The VS Code host is always
vscode; Electron main resolves desktop for the native window theme. The
Settings UI is unchanged.
Testing: vitest in packages/web (surface write/read, no base copy, unknown
surface falls back to base), bun test in packages/vscode and packages/ui,
tsc for every workspace, build:extension.
* fix(settings): keep a legacy copy of the profile in settings.json
The first write after the split rewrote settings.json with the instance
part only, and that write happens on startup (relay reconcile). A build
from before the split reads only settings.json, so rolling back would
have lost every preference: theme, default model, all of it.
Every write now stores the profile's base values in settings.json next
to the instance part (`legacySettingsDocumentOf`), on the server and in
the VS Code extension host alike. Current builds ignore the copy because
preferences.json wins in the merged read. When preferences.json is
unreadable the copy already on disk is kept rather than dropped.
Testing: settings-runtime tests updated for the copy; full web suite
(182 files), VS Code tests and extension build, tsc clean. Verified live
on a scratch OPENCHAMBER_DATA_DIR: all 136 keys survive startup, theme
changes land per surface, plain keys land in the base.
* feat(settings): make the UI password and tunnel preset tokens write-only
GET /api/config/settings returned desktopUiPassword and the managed
remote tunnel preset tokens to every authenticated client, including
paired phones and the VS Code webview that never need them.
Both keys are now `secret` in the registry: accepted on write, withheld
from reads. The server answers with a hasDesktopUiPassword flag; the
desktop network page shows "Password set" and sends a value only when
the user types a new one or presses "Remove password" (an empty string
clears it and turns LAN access off). The tunnel page already learned
token presence from the status endpoint. The VS Code bridge strips
secret keys from what it hands the webview while still merging them
from disk on write.
Testing: registry, i18n parity, server settings, VS Code gate tests and
tsc; workspace type-check. Verified against a scratch server: GET
carries the flag and no password, PUT with '' clears, PUT with a value
sets. The desktop-only page itself awaits the owner's run.
* fix(settings): send the surface kind as a query parameter, not a header
The packaged desktop shell (openchamber-ui://app) and the phone app are
cross-origin to the OpenChamber server, so the x-openchamber-surface
header turned every settings request into a CORS preflight the server
did not allow. Settings looked reset and every save reported "Save
failed" without reaching persistSettings. An older remote instance would
refuse the header the same way even with the allow-list fixed.
The client now sends ?surface=<kind>, which keeps the request
CORS-simple on every server version; the server reads the query
parameter and still honours the header. The header is also in the CORS
allow-list for completeness.
Testing: workspace type-check, persistence and registry tests, server
opencode tests. On a scratch server: PUT with ?surface=vscode lands
under surfaces.vscode, GET without or with an unknown surface serves the
base, the header fallback resolves. Confirmed in the owner's rebuilt
desktop and on the phone.
* refactor(settings): drop the show-password toggle from the desktop network page
With the password write-only, the field only ever holds a value the user
is typing right now; the reveal toggle and its strings are gone from
every locale.
* refactor(projects): serve project setup through the server, drop the legacy migration
The shared UI read and wrote ~/.config/openchamber/projects/<id>.json
itself: it resolved the home directory, composed the path, and used the
Files API, which only desktop and VS Code have natively and which cannot
see a remote instance's file at all. It also still carried the months-old
migration from <repo>/.openchamber/openchamber.json, which deleted files in
the folder the upcoming shared project config will use.
The client-owned keys (worktree setup commands, project actions, draft
starters) now live behind GET/PUT /api/projects/:projectId/config.
project-setup.js sanitizes and builds the view; the project-config runtime
merges a patch under the same cross-process lock the scheduled-task writers
hold, so unknown and server-owned keys survive. A wrongly shaped key is a
400, not a silent drop. openchamberConfig.ts keeps its exported functions
and is now an HTTP client. The VS Code webview handles the route locally
and bridges to the extension host, which owns the file with a TS mirror of
the sanitizers.
Testing: server tests for sanitizers, round trip, lock, and invalid patch;
client tests against a mocked route; VS Code sanitizer and bridge tests;
workspace type-check, both VS Code builds, UI isolated suite (409 files),
server projects and project-context suites. Live GET/PUT against a
running server with the owner's real project config.
* feat(projects): read the team's shared config and merge it with the personal one
A project can now carry <repo>/.openchamber/project.json (version 1:
setupWorktree, setupWorktreeWait, projectActions, draftStarters,
plansDir). The server finds the checkout from the path-derived project
id, parses the file, and answers GET /api/projects/:id/config with one
merged view: what runs at the top level, plus shared and personal blocks
so a page can edit the personal file without copying a teammate's entry
into it.
Merge rules: shared setup commands run first (a personal
setupWorktreeMode of "replace" uses the personal list only); the
personal wait flag wins when set; actions union by id with a personal
action replacing the shared one and personal hiddenSharedActionIds
dropping shared ones; starters union by type:name; the primary action is
personal only. A shared file that exists but cannot be parsed, or that
names a plansDir outside the repo, is reported as invalid with a reason
and never treated as "no shared setup". Nothing writes the repo file yet.
Client: getProjectSetup exposes the view; the existing helpers return
effective values, while the Projects page sections and the draft
starters hook edit the personal block only. Shared entries show a quiet
"shared" mark in the actions dropdown and read-only lists above the
editable ones on the Projects page; shared starter chips have no remove
handle. The VS Code extension host mirrors the parser and merge.
Testing: server tests for the parser, plansDir guard, merge table, id
round trip, and a runtime test against a temp checkout; client tests
against a mocked route; VS Code sanitizer, merge, and bridge tests; the
section test covers the shared row; locale parity; workspace type-check;
UI isolated suite (409 files). Live: GET against a temp repo with a
shared file and with a broken one.
* feat(projects): ask before the team's shared commands run, once per set of commands
Shared setup commands and shared actions come from a file a git pull can
change, and they run on the machine of whoever pulls. The first time one
would run, a dialog now shows exactly what would run and asks: "Trust and
run" or "Not this time". A "trust" answer is recorded in the personal
config against a SHA-256 of the executable parts (setup commands and each
action's id, command, and runIn; renames and icons do not count), so a
pull that changes a command brings the prompt back. Nothing asks when the
shared file has nothing that executes.
Worktree creation (session creator, new-worktree dialog, session store,
multi-run launcher, agent-manager empty state) resolves its commands
through the prompt; "not this time" runs only the user's own commands.
The actions dropdown asks before a shared action runs. The Projects page
shows "Trusted on this instance" with a "Reset trust" button next to the
shared actions. The dialog is mounted beside the app-link confirmation on
every shell. The VS Code extension host mirrors the hash and the record.
Testing: server tests for hash stability, ordering, and the trusted flag,
plus a runtime test that changes the shared file and sees trust drop;
client tests for the confirmation store (ask, trust, skip, replace mode,
newer request, failed record, reset); VS Code mirror tests; the actions
button, new-worktree dialog, and issue-2039 tests updated for the trust
path; locale parity; workspace type-check; UI isolated suite (410 files).
* feat(projects): share and unshare setup with the team from the Projects page
The repo file <repo>/.openchamber/project.json is now written by the app,
and only when the user shares something: nothing appears in a repository
until then. PUT /api/projects/:id/config/shared replaces the keys it
names over the current file, writes it pretty-printed with version first
and only the keys that carry something, removes the file (and an empty
.openchamber folder) when nothing is left, refuses a missing checkout or
a plansDir outside the repo, and records trust for the writer, who has
seen what they shared.
On the Projects page, actions and setup commands get "Share with team"
and "Make personal"; shared actions can be hidden for this user; a
checkbox switches to "Use only my setup commands". Project starter chips
get share and make-personal hover buttons. A new "Shared config" block
shows the file's path and status, the shared plans folder, and the trust
status with "Reset trust". A share is a repo write followed by a personal
write; a failure after the first leaves the item visible once, as
personal. The VS Code extension host mirrors the writer.
Testing: server tests for the patch, serialization, emptiness, the write
and removal round trip, the writer's trust record, and the refusals;
client test for the shared route; VS Code bridge test for write and
removal; locale parity; workspace type-check; UI isolated suite (410
files). Live on a scratch server: share, invalid plansDir (400), unshare
to removal of file and folder.
* feat(projects): list, edit, and move plans in the team's shared plans folder
When the shared config names a plansDir, every markdown file in that
folder is a plan on the Plans tab: listed after the user's own plans,
marked shared, addressed as shared:<file>, read and edited in place
(the raw document is written verbatim, so a plan another tool wrote
keeps its shape), and deletable. Share moves one of the user's plans
into the folder; make personal moves it back under a new id; a name
collision gets a numeric suffix. Sharing is refused, with a hint in the
panel, until a shared plans folder is set in Project settings. This
answers the request to read plans from an existing folder such as
docs/plans.
Server: the project-context runtime takes resolveSharedPlansDir from the
project-config runtime; readContext reports sharedPlansDir; POST
.../plans/:id/share and /unshare. Client: movePlan in the context store,
a shared badge and a share / make-personal button per plan row. Session
attachments reference plan ids, so an attached plan that moves has to be
attached again.
Testing: runtime tests for listing, foreign markdown titles, id
traversal, in-place update and delete, share and unshare with a
collision, and the refusal without a folder; HTTP route tests; store and
locale parity tests; workspace type-check; full web suite (183 files);
UI isolated suite (410 files). Live on a scratch server against a temp
repo: list, share, read, unshare.
* fix(server): make OPENCHAMBER_DATA_DIR move every folder, not just the flat files
The variable is documented as the OpenChamber data directory, but only
settings, preferences, auth, and push files followed it; projects,
themes, speech models, and the chats default stayed under
~/.config/openchamber. A second instance started with a custom
directory therefore read and wrote the default instance's project
configs.
Every folder now hangs off the one root. An instance that already used
a custom directory gets projects, themes, and speech-models copied in
once at startup; copied, not moved, so a second instance beside the
default one cannot strip it, and nothing is merged into a folder that
already exists. Existing managed chats are not copied, as with
OPENCHAMBER_CHATS_DIR.
Testing: migration tests for copy-once, no-merge, and same-root no-op;
full web suite; a scratch server with an empty data dir copied the real
project configs and kept its writes in the copy.
* fix(projects): keep a plan's id when it moves into or out of the repository folder
A plan moved into the repository plans folder used to be listed under a
new shared:<file> id, so a session that had attached it lost the
attachment. The manifest entry now stays with a `shared` flag that says
which folder holds the file; the id survives both directions. Only a
plan that never had an entry (one written by another tool) gets an id
when it is brought in. A personal file and a repository file may share
a name because they live in different folders.
Testing: runtime tests for share and unshare with a stable id, reading
and editing the moved plan, the suffix on a name collision, and the
adoption of a foreign file.
* feat(projects): default repository plans folder, "move to repository" wording, tooltips
Plans now have a repository folder without any setup: .openchamber/plans
by default. A custom plansDir replaces the default outright (only that
folder is read and written; moving files between the two is the user's
job), and the field's placeholder and hint say so. The move buttons on
plans are therefore always available.
The word "share" is gone from the UI: it read like publishing, while
the action stores an item in the repository so everyone who pulls it
gets it. Labels are "Move to repository" / "Move to my settings", the
badge is "In repo", the block is "Repository config", and every button
on the Projects page carries a tooltip that says what happens (the
"Move to repository" button explains that edits save first while the
form is dirty). The trust status with "reset trust" moved from the
repository block into the Worktree section next to the commands it
guards; the plan row's badge sits beside the title.
Testing: locale parity, section test, workspace type-check, UI isolated
suite (410 files), full web suite.
* fix(projects): leave the icon key out of the repository file when an action has none
Actions without an icon were written as "icon": null into
.openchamber/project.json. The key is now omitted; readers already fall
back to the play icon. Server and VS Code serializers, tests updated.
* docs: describe the repository config file and how items move into it
A new page in every locale: what stays personal and what can move into
the repository, the .openchamber/project.json format with an example
and every key explained (setup commands, actions with the supported icon
names, starters, plansDir), the merge rules, the trust prompt, and plans
in the repository. Linked from the sidebar and from Project Actions.
Translations written by hand.
This commit is contained in:
committed by
GitHub
parent
ff75dc9bd5
commit
85c4320825
@@ -25,4 +25,6 @@ Aktiviere **auto-open URL** für eine Aktion, die einen Server startet. OpenCham
|
||||
|
||||
## Verwandt
|
||||
|
||||
- [Repository-Konfiguration](/repository-config/) — Aktionen und Setup-Befehle im Repository für das ganze Team ablegen
|
||||
|
||||
- [Vorschau & Entwicklungsserver](/preview/) — einen laufenden Entwicklungsserver in OpenChamber öffnen
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
---
|
||||
title: Repository-Konfiguration
|
||||
description: Projektaktionen, Worktree-Setup-Befehle, Starter und Pläne im Repository ablegen, damit alle sie bekommen, die es pullen.
|
||||
---
|
||||
|
||||
# Repository-Konfiguration
|
||||
|
||||
Projektaktionen, Worktree-Setup-Befehle und Entwurfs-Starter liegen standardmäßig in deinen eigenen OpenChamber-Einstellungen. Niemand sonst sieht sie. Wenn jemand im Team, der das Repository klont, dieselbe Dev-Server-Aktion und dasselbe `bun install` in jedem neuen Worktree bekommen soll, verschiebe diese Einträge ins Repository.
|
||||
|
||||
OpenChamber legt sie in `.openchamber/project.json` im Wurzelverzeichnis des Repositorys ab. Die Datei entsteht erst, wenn du den ersten Eintrag dorthin verschiebst, und verschwindet wieder, wenn du den letzten herausnimmst. Committe sie wie jede andere Datei.
|
||||
|
||||
## Was wohin gehört
|
||||
|
||||
| Bleibt in deinen Einstellungen | Kann ins Repository |
|
||||
|---|---|
|
||||
| Notizen und Todos | Projektaktionen |
|
||||
| Geplante Aufgaben | Worktree-Setup-Befehle |
|
||||
| Welche Repository-Aktion du für dich ausgeblendet hast | Entwurfs-Starter (angeheftete Befehle und Skills) |
|
||||
| Deine Vertrauensantwort für Repository-Befehle | Pläne |
|
||||
|
||||
Notizen, Todos und geplante Aufgaben gehören dir. Sie landen nie im Repository.
|
||||
|
||||
## Einen Eintrag verschieben
|
||||
|
||||
Öffne **Settings → Projects** und wähle das Projekt. Jede Aktion und jeder Setup-Befehl hat einen Button **Move to repository**, und jeder Eintrag aus dem Repository hat **Move to my settings**. Starter auf dem Bildschirm für neue Sitzungen zeigen dasselbe Paar beim Überfahren. Pläne haben es in jeder Zeile des Tabs „Pläne“.
|
||||
|
||||
Verschieben heißt verschieben. Der Eintrag verlässt den einen Ort und landet am anderen, nichts wird verdoppelt.
|
||||
|
||||
Einträge aus dem Repository tragen das Abzeichen **In repo**. Repository-Aktionen lassen sich mit **Hide for me** aus deinem Menü ausblenden. Das ändert nur dein Menü, nicht die Datei.
|
||||
|
||||
## Die Datei
|
||||
|
||||
```json
|
||||
{
|
||||
"version": 1,
|
||||
"setupWorktree": [
|
||||
"bun install"
|
||||
],
|
||||
"setupWorktreeWait": true,
|
||||
"projectActions": [
|
||||
{
|
||||
"id": "dev",
|
||||
"name": "Dev server",
|
||||
"command": "bun run dev",
|
||||
"icon": "rocket",
|
||||
"autoOpenUrl": true,
|
||||
"platforms": ["macos", "linux"]
|
||||
},
|
||||
{
|
||||
"id": "test",
|
||||
"name": "Tests",
|
||||
"command": "bun test"
|
||||
}
|
||||
],
|
||||
"draftStarters": [
|
||||
{ "type": "skill", "name": "triage-prs" }
|
||||
],
|
||||
"plansDir": "docs/plans"
|
||||
}
|
||||
```
|
||||
|
||||
Nur `version` ist Pflicht. Alle anderen Schlüssel sind optional, und OpenChamber schreibt nur die, die etwas enthalten.
|
||||
|
||||
`setupWorktree` ist die Liste der Shell-Befehle, die OpenChamber direkt nach dem Anlegen eines neuen Worktrees darin ausführt, der Reihe nach. Verwende `$ROOT_PROJECT_PATH` für den Pfad des Haupt-Checkouts. Mit `setupWorktreeWait: true` wartet OpenChamber auf diese Befehle, bevor es eine Sitzung im Worktree startet.
|
||||
|
||||
`projectActions` ist die Liste der Aktionen im Kopfzeilenmenü. `id`, `name` und `command` sind Pflicht. `icon` ist optional und fällt auf ein Play-Symbol zurück; OpenChamber kennt die Namen `play`, `build`, `lint`, `terminal`, `tools`, `bug`, `flask`, `rocket`, `code`, `server`, `branch`, `search`, `settings`, `brain`, `stack`, `robot`, `command` und `file`. `autoOpenUrl: true` öffnet die Adresse, die der Befehl ausgibt, siehe [Vorschau und Entwicklungsserver](/preview/). `platforms` beschränkt die Aktion auf `macos`, `linux` oder `windows`. `runIn: "parent"` führt die Aktion im Haupt-Checkout statt im aktuellen Worktree aus.
|
||||
|
||||
`draftStarters` heftet Befehle und Skills an den Bildschirm für neue Sitzungen. Jeder Eintrag hat die Form `{ "type": "command" | "skill", "name": "..." }`, und der Befehl oder Skill selbst muss in der OpenCode-Konfiguration des Repositorys existieren.
|
||||
|
||||
`plansDir` ist der Ort der Repository-Pläne. Lass ihn weg, um `.openchamber/plans` zu verwenden. Siehe unten.
|
||||
|
||||
Du kannst diese Datei von Hand schreiben. Ein Schlüssel mit falscher Form macht die ganze Datei ungültig, und die Seite Projects sagt dir warum, statt ihn stillschweigend zu ignorieren.
|
||||
|
||||
## Wie sich Repository- und eigene Einträge verbinden
|
||||
|
||||
Zuerst laufen die Setup-Befehle aus dem Repository, dann deine eigenen. Hake **Use only my setup commands** im Abschnitt Worktree an, um die Befehle des Repositorys ganz zu überspringen.
|
||||
|
||||
Aktionen werden nach `id` zusammengeführt. Eine Aktion in deinen Einstellungen mit derselben id wie eine Repository-Aktion ersetzt diese. Starter werden nach Name zusammengeführt.
|
||||
|
||||
Das Warte-Flag kommt aus deinen Einstellungen, wenn du es gesetzt hast, sonst aus dem Repository.
|
||||
|
||||
## Vertrauen
|
||||
|
||||
Setup-Befehle und Aktionen aus dem Repository laufen auf deinem Rechner, und ein `git pull` kann sie ändern. Deshalb zeigt OpenChamber beim ersten Mal, wenn einer davon ausgeführt werden soll, die genauen Befehle und fragt. **Trust and run** merkt sich deine Antwort auf dieser Instanz. **Not this time** führt nur deine eigenen Befehle aus.
|
||||
|
||||
Die Antwort ist an die Befehle selbst gebunden. Wenn ein Pull einen Repository-Befehl ändert, kommt die Frage für den neuen Text zurück. Mit **reset trust** im Abschnitt Worktree der Projekteinstellungen vergisst OpenChamber die Antwort.
|
||||
|
||||
Einen eigenen Befehl ins Repository zu verschieben gilt als Vertrauen, denn du hast ihn gerade gesehen.
|
||||
|
||||
## Pläne im Repository
|
||||
|
||||
Pläne aus dem Tab „Pläne“ können ebenfalls im Repository liegen, als Markdown-Dateien. Der Standardordner ist `.openchamber/plans`. Setze **Plans folder** in den Projekteinstellungen, um einen anderen Ordner im Repository zu verwenden, etwa `docs/plans`, wenn das Team seine Pläne schon dort hat. Ein eigener Ordner ersetzt den Standard vollständig: OpenChamber liest und schreibt nur diesen Ordner, verschiebe vorhandene Dateien beim Wechsel also selbst.
|
||||
|
||||
Jede `.md`-Datei in diesem Ordner erscheint im Tab „Pläne“, auch Dateien aus anderen Werkzeugen. Beim Bearbeiten in OpenChamber wird die Datei so gespeichert, wie du sie getippt hast. Ein Plan, den du ins Repository verschiebst, behält seine Identität, sodass Sitzungen, die ihn angehängt hatten, ihn weiterhin finden.
|
||||
|
||||
## Verwandt
|
||||
|
||||
- [Projektaktionen](/project-actions/)
|
||||
- [Worktrees](/worktrees/)
|
||||
- [Projektnotizen, Todos und Pläne](/notes-todos-plans/)
|
||||
@@ -25,6 +25,8 @@ Starts OpenChamber in headless mode when set to `true` or `1`. API routes stay a
|
||||
|
||||
Overrides the OpenChamber data directory. The default is `~/.config/openchamber`.
|
||||
|
||||
Everything OpenChamber stores lives under this directory: settings, auth, project configs, themes, plans, and speech models. An instance that used a custom directory before version 1.23 gets its `projects`, `themes`, and `speech-models` folders copied from `~/.config/openchamber` on the first start; the originals stay in place and nothing is merged.
|
||||
|
||||
### `OPENCHAMBER_CHATS_DIR`
|
||||
|
||||
Moves the managed chat directories that OpenChamber creates for chats without a project. The default is `~/.config/openchamber/chats`. Set it to a directory the OpenCode server can read when OpenChamber and OpenCode run as different users. Existing chats are not moved.
|
||||
|
||||
@@ -25,4 +25,6 @@ Activa **auto-open URL** para una acción que inicia un servidor. OpenChamber ob
|
||||
|
||||
## Relacionado
|
||||
|
||||
- [Configuración en el repositorio](/repository-config/) — guarda acciones y comandos de configuración en el repositorio para todo el equipo
|
||||
|
||||
- [Vista previa y servidores de desarrollo](/es/preview/) — abre un servidor de desarrollo en marcha dentro de OpenChamber
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
---
|
||||
title: Configuración en el repositorio
|
||||
description: Guarda acciones del proyecto, comandos de configuración de worktree, arranques y planes en el repositorio para que los tenga todo el que lo clone.
|
||||
---
|
||||
|
||||
# Configuración en el repositorio
|
||||
|
||||
Las acciones del proyecto, los comandos de configuración de worktree y los arranques de borrador viven por defecto en tus propios ajustes de OpenChamber. Nadie más los ve. Si quieres que quien clone el repositorio tenga la misma acción de servidor de desarrollo y el mismo `bun install` en cada worktree nuevo, mueve esos elementos al repositorio.
|
||||
|
||||
OpenChamber los guarda en `.openchamber/project.json` en la raíz del repositorio. El archivo aparece solo cuando mueves allí el primer elemento y desaparece cuando sacas el último. Haz commit como con cualquier otro archivo.
|
||||
|
||||
## Qué va a cada sitio
|
||||
|
||||
| Se queda en tus ajustes | Puede ir al repositorio |
|
||||
|---|---|
|
||||
| Notas y tareas | Acciones del proyecto |
|
||||
| Tareas programadas | Comandos de configuración de worktree |
|
||||
| Qué acción del repositorio has ocultado para ti | Arranques de borrador (comandos y skills fijados) |
|
||||
| Tu respuesta de confianza para los comandos del repositorio | Planes |
|
||||
|
||||
Las notas, las tareas y las tareas programadas son tuyas. Nunca acaban en el repositorio.
|
||||
|
||||
## Mover un elemento
|
||||
|
||||
Abre **Settings → Projects** y elige el proyecto. Cada acción y cada comando de configuración tiene un botón **Move to repository**, y cada elemento que viene del repositorio tiene **Move to my settings**. Los arranques de la pantalla de nueva sesión muestran el mismo par al pasar el cursor. Los planes lo tienen en cada fila de la pestaña Planes.
|
||||
|
||||
Mover es exactamente eso. El elemento sale de un sitio y llega al otro, no se duplica nada.
|
||||
|
||||
Los elementos del repositorio muestran la insignia **In repo**. Las acciones del repositorio también se pueden ocultar de tu menú con **Hide for me**. Eso solo cambia tu menú, no el archivo.
|
||||
|
||||
## El archivo
|
||||
|
||||
```json
|
||||
{
|
||||
"version": 1,
|
||||
"setupWorktree": [
|
||||
"bun install"
|
||||
],
|
||||
"setupWorktreeWait": true,
|
||||
"projectActions": [
|
||||
{
|
||||
"id": "dev",
|
||||
"name": "Dev server",
|
||||
"command": "bun run dev",
|
||||
"icon": "rocket",
|
||||
"autoOpenUrl": true,
|
||||
"platforms": ["macos", "linux"]
|
||||
},
|
||||
{
|
||||
"id": "test",
|
||||
"name": "Tests",
|
||||
"command": "bun test"
|
||||
}
|
||||
],
|
||||
"draftStarters": [
|
||||
{ "type": "skill", "name": "triage-prs" }
|
||||
],
|
||||
"plansDir": "docs/plans"
|
||||
}
|
||||
```
|
||||
|
||||
Solo `version` es obligatorio. El resto de claves son opcionales, y OpenChamber escribe solo las que contienen algo.
|
||||
|
||||
`setupWorktree` es la lista de comandos de shell que OpenChamber ejecuta dentro de un worktree nuevo justo después de crearlo, en orden. Usa `$ROOT_PROJECT_PATH` para la ruta del checkout principal. `setupWorktreeWait: true` hace que OpenChamber espere a estos comandos antes de iniciar una sesión en el worktree.
|
||||
|
||||
`projectActions` es la lista de acciones del menú de la cabecera. `id`, `name` y `command` son obligatorios. `icon` es opcional y por defecto es un icono de play; los nombres que OpenChamber conoce son `play`, `build`, `lint`, `terminal`, `tools`, `bug`, `flask`, `rocket`, `code`, `server`, `branch`, `search`, `settings`, `brain`, `stack`, `robot`, `command` y `file`. `autoOpenUrl: true` abre la dirección que imprime el comando, consulta [Vista previa y servidores de desarrollo](/preview/). `platforms` limita la acción a `macos`, `linux` o `windows`. `runIn: "parent"` ejecuta la acción en el checkout principal en lugar del worktree actual.
|
||||
|
||||
`draftStarters` fija comandos y skills en la pantalla de nueva sesión. Cada entrada es `{ "type": "command" | "skill", "name": "..." }`, y el comando o skill tiene que existir en la configuración de OpenCode del repositorio.
|
||||
|
||||
`plansDir` es donde viven los planes del repositorio. Omítelo para usar `.openchamber/plans`. Más abajo se explica.
|
||||
|
||||
Puedes escribir este archivo a mano. Una clave con forma incorrecta invalida el archivo entero, y la página Projects te dice por qué en lugar de ignorarla en silencio.
|
||||
|
||||
## Cómo se combinan los elementos del repositorio y los tuyos
|
||||
|
||||
Primero se ejecutan los comandos de configuración del repositorio, después los tuyos. Marca **Use only my setup commands** en la sección Worktree para omitir por completo los del repositorio.
|
||||
|
||||
Las acciones se combinan por `id`. Una acción de tus ajustes con el mismo id que una del repositorio la reemplaza. Los arranques se combinan por nombre.
|
||||
|
||||
La marca de espera sale de tus ajustes cuando la has fijado, y si no, del repositorio.
|
||||
|
||||
## Confianza
|
||||
|
||||
Los comandos de configuración y las acciones del repositorio se ejecutan en tu máquina, y un `git pull` puede cambiarlos. Por eso, la primera vez que uno de ellos está a punto de ejecutarse, OpenChamber muestra los comandos exactos y pregunta. **Trust and run** recuerda tu respuesta en esta instancia. **Not this time** ejecuta solo tus propios comandos.
|
||||
|
||||
La respuesta va ligada a los comandos en sí. Cuando un pull cambia un comando del repositorio, la pregunta vuelve para el texto nuevo. Puedes olvidar la respuesta con **reset trust** en la sección Worktree de los ajustes del proyecto.
|
||||
|
||||
Mover un comando tuyo al repositorio cuenta como confiar en él, porque acabas de verlo.
|
||||
|
||||
## Planes en el repositorio
|
||||
|
||||
Los planes de la pestaña Planes también pueden vivir en el repositorio como archivos Markdown. La carpeta por defecto es `.openchamber/plans`. Define **Plans folder** en los ajustes del proyecto para usar otra carpeta dentro del repositorio, por ejemplo `docs/plans` si tu equipo ya guarda ahí los planes. Una carpeta propia reemplaza por completo la predeterminada: OpenChamber lee y escribe solo en esa carpeta, así que mueve tú mismo los archivos existentes cuando la cambies.
|
||||
|
||||
Cada archivo `.md` de esa carpeta aparece en la pestaña Planes, incluidos los escritos por otras herramientas. Editar uno en OpenChamber guarda el archivo tal como lo escribiste. Un plan que mueves al repositorio conserva su identidad, así que las sesiones que lo tenían adjunto lo siguen encontrando.
|
||||
|
||||
## Relacionado
|
||||
|
||||
- [Acciones del proyecto](/project-actions/)
|
||||
- [Worktrees](/worktrees/)
|
||||
- [Notas, tareas y planes del proyecto](/notes-todos-plans/)
|
||||
@@ -25,4 +25,6 @@ Activez **auto-open URL** pour une action qui démarre un serveur. OpenChamber s
|
||||
|
||||
## Pages liées
|
||||
|
||||
- [Configuration du dépôt](/repository-config/) — garder les actions et commandes de configuration dans le dépôt pour toute l'équipe
|
||||
|
||||
- [Aperçu et serveurs de dev](/preview/) — ouvrir un serveur de dev en cours d’exécution dans OpenChamber
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
---
|
||||
title: Configuration du dépôt
|
||||
description: Gardez les actions de projet, les commandes de configuration de worktree, les amorces et les plans dans le dépôt pour que tous ceux qui le récupèrent les aient.
|
||||
---
|
||||
|
||||
# Configuration du dépôt
|
||||
|
||||
Les actions de projet, les commandes de configuration de worktree et les amorces de brouillon vivent par défaut dans vos propres réglages OpenChamber. Personne d'autre ne les voit. Si vous voulez qu'un collègue qui clone le dépôt ait la même action de serveur de dev et le même `bun install` dans chaque nouveau worktree, déplacez ces éléments dans le dépôt.
|
||||
|
||||
OpenChamber les enregistre dans `.openchamber/project.json` à la racine du dépôt. Le fichier n'apparaît que lorsque vous y déplacez le premier élément, et il disparaît quand vous retirez le dernier. Committez-le comme n'importe quel autre fichier.
|
||||
|
||||
## Ce qui va où
|
||||
|
||||
| Reste dans vos réglages | Peut aller dans le dépôt |
|
||||
|---|---|
|
||||
| Notes et tâches | Actions de projet |
|
||||
| Tâches planifiées | Commandes de configuration de worktree |
|
||||
| Les actions du dépôt que vous avez masquées pour vous | Amorces de brouillon (commandes et skills épinglés) |
|
||||
| Votre réponse de confiance pour les commandes du dépôt | Plans |
|
||||
|
||||
Les notes, les tâches et les tâches planifiées sont à vous. Elles n'arrivent jamais dans le dépôt.
|
||||
|
||||
## Déplacer un élément
|
||||
|
||||
Ouvrez **Settings → Projects** et choisissez le projet. Chaque action et chaque commande de configuration a un bouton **Move to repository**, et chaque élément venu du dépôt a **Move to my settings**. Les amorces de l'écran de nouvelle session montrent la même paire au survol. Les plans l'ont sur chaque ligne de l'onglet Plans.
|
||||
|
||||
Déplacer, c'est déplacer. L'élément quitte un endroit et arrive à l'autre, rien n'est dupliqué.
|
||||
|
||||
Les éléments du dépôt portent le badge **In repo**. Les actions du dépôt peuvent aussi être masquées de votre menu avec **Hide for me**. Cela ne change que votre menu, pas le fichier.
|
||||
|
||||
## Le fichier
|
||||
|
||||
```json
|
||||
{
|
||||
"version": 1,
|
||||
"setupWorktree": [
|
||||
"bun install"
|
||||
],
|
||||
"setupWorktreeWait": true,
|
||||
"projectActions": [
|
||||
{
|
||||
"id": "dev",
|
||||
"name": "Dev server",
|
||||
"command": "bun run dev",
|
||||
"icon": "rocket",
|
||||
"autoOpenUrl": true,
|
||||
"platforms": ["macos", "linux"]
|
||||
},
|
||||
{
|
||||
"id": "test",
|
||||
"name": "Tests",
|
||||
"command": "bun test"
|
||||
}
|
||||
],
|
||||
"draftStarters": [
|
||||
{ "type": "skill", "name": "triage-prs" }
|
||||
],
|
||||
"plansDir": "docs/plans"
|
||||
}
|
||||
```
|
||||
|
||||
Seul `version` est obligatoire. Toutes les autres clés sont facultatives, et OpenChamber n'écrit que celles qui contiennent quelque chose.
|
||||
|
||||
`setupWorktree` est la liste des commandes shell qu'OpenChamber exécute dans un nouveau worktree juste après sa création, dans l'ordre. Utilisez `$ROOT_PROJECT_PATH` pour le chemin du checkout principal. `setupWorktreeWait: true` fait attendre OpenChamber la fin de ces commandes avant de démarrer une session dans le worktree.
|
||||
|
||||
`projectActions` est la liste des actions du menu d'en-tête. `id`, `name` et `command` sont obligatoires. `icon` est facultatif et retombe sur une icône play ; les noms connus d'OpenChamber sont `play`, `build`, `lint`, `terminal`, `tools`, `bug`, `flask`, `rocket`, `code`, `server`, `branch`, `search`, `settings`, `brain`, `stack`, `robot`, `command` et `file`. `autoOpenUrl: true` ouvre l'adresse affichée par la commande, voir [Aperçu et serveurs de dev](/preview/). `platforms` limite l'action à `macos`, `linux` ou `windows`. `runIn: "parent"` exécute l'action dans le checkout principal plutôt que dans le worktree courant.
|
||||
|
||||
`draftStarters` épingle des commandes et des skills sur l'écran de nouvelle session. Chaque entrée s'écrit `{ "type": "command" | "skill", "name": "..." }`, et la commande ou le skill doit exister dans la configuration OpenCode du dépôt.
|
||||
|
||||
`plansDir` indique où vivent les plans du dépôt. Omettez-le pour utiliser `.openchamber/plans`. Voir plus bas.
|
||||
|
||||
Vous pouvez écrire ce fichier à la main. Une clé de mauvaise forme rend tout le fichier invalide, et la page Projects vous dit pourquoi au lieu de l'ignorer en silence.
|
||||
|
||||
## Comment les éléments du dépôt et les vôtres se combinent
|
||||
|
||||
Les commandes de configuration du dépôt s'exécutent d'abord, puis les vôtres. Cochez **Use only my setup commands** dans la section Worktree pour ignorer complètement celles du dépôt.
|
||||
|
||||
Les actions sont fusionnées par `id`. Une action de vos réglages avec le même id qu'une action du dépôt la remplace. Les amorces sont fusionnées par nom.
|
||||
|
||||
L'indicateur d'attente vient de vos réglages quand vous l'avez défini, sinon du dépôt.
|
||||
|
||||
## Confiance
|
||||
|
||||
Les commandes de configuration et les actions du dépôt s'exécutent sur votre machine, et un `git pull` peut les changer. Donc la première fois que l'une d'elles est sur le point de s'exécuter, OpenChamber affiche les commandes exactes et demande. **Trust and run** mémorise votre réponse sur cette instance. **Not this time** n'exécute que vos propres commandes.
|
||||
|
||||
La réponse est liée aux commandes elles-mêmes. Quand un pull modifie une commande du dépôt, la question revient pour le nouveau texte. Vous pouvez oublier la réponse avec **reset trust** dans la section Worktree des réglages du projet.
|
||||
|
||||
Déplacer votre propre commande dans le dépôt vaut confiance, puisque vous venez de la voir.
|
||||
|
||||
## Plans dans le dépôt
|
||||
|
||||
Les plans de l'onglet Plans peuvent aussi vivre dans le dépôt, sous forme de fichiers Markdown. Le dossier par défaut est `.openchamber/plans`. Définissez **Plans folder** dans les réglages du projet pour utiliser un autre dossier du dépôt, par exemple `docs/plans` si votre équipe y garde déjà ses plans. Un dossier personnalisé remplace entièrement le dossier par défaut : OpenChamber ne lit et n'écrit que ce dossier, déplacez donc vous-même les fichiers existants quand vous le changez.
|
||||
|
||||
Chaque fichier `.md` de ce dossier apparaît dans l'onglet Plans, y compris les fichiers écrits par d'autres outils. Modifier un plan dans OpenChamber enregistre le fichier tel que vous l'avez tapé. Un plan que vous déplacez dans le dépôt garde son identité, donc les sessions qui l'avaient attaché le retrouvent.
|
||||
|
||||
## Pages liées
|
||||
|
||||
- [Actions de projet](/project-actions/)
|
||||
- [Worktrees](/worktrees/)
|
||||
- [Notes, tâches et plans du projet](/notes-todos-plans/)
|
||||
@@ -25,6 +25,8 @@ OpenChamber Web サーバーのバインドアドレスです。他のマシン
|
||||
|
||||
OpenChamber のデータディレクトリを上書きします。デフォルトは `~/.config/openchamber` です。
|
||||
|
||||
OpenChamber が保存するものはすべてこのディレクトリ配下にあります: 設定、認証、プロジェクト設定、テーマ、プラン、音声モデル。バージョン 1.23 より前にカスタムディレクトリを使っていたインスタンスでは、初回起動時に `projects`、`themes`、`speech-models` フォルダーが `~/.config/openchamber` からここへコピーされます。元のフォルダーはそのまま残り、マージはされません。
|
||||
|
||||
### `OPENCHAMBER_CHATS_DIR`
|
||||
|
||||
プロジェクトを持たないチャット用に OpenChamber が作成する管理チャットディレクトリの場所を変更します。デフォルトは `~/.config/openchamber/chats` です。OpenChamber と OpenCode を別のユーザーで実行している場合は、OpenCode サーバーが読み取れるディレクトリを指定してください。既存のチャットは移動されません。
|
||||
|
||||
@@ -25,4 +25,6 @@ description: よく実行するコマンドを保存し、ワンクリックで
|
||||
|
||||
## 関連
|
||||
|
||||
- [リポジトリ設定](/repository-config/) — アクションとセットアップコマンドをリポジトリに置いてチーム全体で使う
|
||||
|
||||
- [プレビューと開発サーバー](/preview/) — 実行中の開発サーバーを OpenChamber 内で開く
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
---
|
||||
title: リポジトリ設定
|
||||
description: プロジェクトアクション、ワークツリーのセットアップコマンド、スターター、プランをリポジトリに置き、pull した全員が同じものを使えるようにします。
|
||||
---
|
||||
|
||||
# リポジトリ設定
|
||||
|
||||
プロジェクトアクション、ワークツリーのセットアップコマンド、下書きスターターは、デフォルトではあなた自身の OpenChamber 設定に保存されます。他の人には見えません。リポジトリをクローンしたチームメンバーにも同じ開発サーバーのアクションと、新しいワークツリーごとの同じ `bun install` を使ってほしいなら、それらの項目をリポジトリへ移動します。
|
||||
|
||||
OpenChamber はそれらをリポジトリ直下の `.openchamber/project.json` に保存します。このファイルは最初の項目を移動したときに初めて作られ、最後の項目を戻すと消えます。ほかのファイルと同じようにコミットしてください。
|
||||
|
||||
## 何がどこに入るか
|
||||
|
||||
| あなたの設定に残るもの | リポジトリへ移動できるもの |
|
||||
|---|---|
|
||||
| ノートと Todo | プロジェクトアクション |
|
||||
| スケジュールタスク | ワークツリーのセットアップコマンド |
|
||||
| リポジトリのアクションのうち自分だけ非表示にしたもの | 下書きスターター(ピン留めしたコマンドとスキル) |
|
||||
| リポジトリのコマンドに対する信頼の回答 | プラン |
|
||||
|
||||
ノート、Todo、スケジュールタスクはあなたのものです。リポジトリに入ることはありません。
|
||||
|
||||
## 項目を移動する
|
||||
|
||||
**Settings → Projects** を開き、プロジェクトを選びます。各アクションと各セットアップコマンドには **Move to repository** ボタンがあり、リポジトリ由来の各項目には **Move to my settings** があります。新規セッション画面のスターターはホバーで同じ 2 つを表示します。プランはプランタブの各行にあります。
|
||||
|
||||
移動は文字どおり移動です。項目は一方から消えてもう一方に現れ、複製はされません。
|
||||
|
||||
リポジトリ由来の項目には **In repo** バッジが付きます。リポジトリのアクションは **Hide for me** で自分のメニューから隠せます。これはあなたのメニューだけを変え、ファイルは変えません。
|
||||
|
||||
## ファイル
|
||||
|
||||
```json
|
||||
{
|
||||
"version": 1,
|
||||
"setupWorktree": [
|
||||
"bun install"
|
||||
],
|
||||
"setupWorktreeWait": true,
|
||||
"projectActions": [
|
||||
{
|
||||
"id": "dev",
|
||||
"name": "Dev server",
|
||||
"command": "bun run dev",
|
||||
"icon": "rocket",
|
||||
"autoOpenUrl": true,
|
||||
"platforms": ["macos", "linux"]
|
||||
},
|
||||
{
|
||||
"id": "test",
|
||||
"name": "Tests",
|
||||
"command": "bun test"
|
||||
}
|
||||
],
|
||||
"draftStarters": [
|
||||
{ "type": "skill", "name": "triage-prs" }
|
||||
],
|
||||
"plansDir": "docs/plans"
|
||||
}
|
||||
```
|
||||
|
||||
必須なのは `version` だけです。ほかのキーはすべて省略可能で、OpenChamber は中身のあるキーだけを書き込みます。
|
||||
|
||||
`setupWorktree` は、新しいワークツリーを作成した直後にその中で OpenChamber が順番に実行するシェルコマンドの一覧です。メインのチェックアウトのパスには `$ROOT_PROJECT_PATH` を使います。`setupWorktreeWait: true` にすると、OpenChamber はこれらのコマンドの完了を待ってからワークツリーでセッションを開始します。
|
||||
|
||||
`projectActions` はヘッダーメニューのアクション一覧です。`id`、`name`、`command` は必須です。`icon` は省略可能で、省略時は play アイコンになります。OpenChamber が認識する名前は `play`、`build`、`lint`、`terminal`、`tools`、`bug`、`flask`、`rocket`、`code`、`server`、`branch`、`search`、`settings`、`brain`、`stack`、`robot`、`command`、`file` です。`autoOpenUrl: true` はコマンドが出力したアドレスを開きます([プレビューと開発サーバー](/preview/) を参照)。`platforms` はアクションを `macos`、`linux`、`windows` に限定します。`runIn: "parent"` は現在のワークツリーではなくメインのチェックアウトでアクションを実行します。
|
||||
|
||||
`draftStarters` はコマンドとスキルを新規セッション画面にピン留めします。各項目は `{ "type": "command" | "skill", "name": "..." }` の形で、コマンドやスキル自体はリポジトリの OpenCode 設定に存在している必要があります。
|
||||
|
||||
`plansDir` はリポジトリのプランを置く場所です。省略すると `.openchamber/plans` が使われます。後述します。
|
||||
|
||||
このファイルは手で書いても構いません。形の違うキーがあるとファイル全体が無効になり、Projects ページは黙って無視する代わりに理由を表示します。
|
||||
|
||||
## リポジトリの項目と自分の項目の組み合わせ
|
||||
|
||||
セットアップコマンドはリポジトリのものが先に実行され、その後にあなたのものが実行されます。Worktree セクションの **Use only my setup commands** にチェックを入れると、リポジトリのコマンドを完全にスキップします。
|
||||
|
||||
アクションは `id` でマージされます。リポジトリのアクションと同じ id があなたの設定にあれば、そちらが優先されます。スターターは名前でマージされます。
|
||||
|
||||
待機フラグは、あなたが設定していればその値、なければリポジトリの値が使われます。
|
||||
|
||||
## 信頼
|
||||
|
||||
リポジトリのセットアップコマンドとアクションはあなたのマシンで実行され、`git pull` で内容が変わることがあります。そのため、いずれかが初めて実行されそうになったとき、OpenChamber は正確なコマンドを表示して確認します。**Trust and run** はこのインスタンスで回答を記憶します。**Not this time** はあなた自身のコマンドだけを実行します。
|
||||
|
||||
回答はコマンドそのものに結び付いています。pull でリポジトリのコマンドが変わると、新しい内容について再度確認されます。プロジェクト設定の Worktree セクションにある **reset trust** で回答を忘れさせることができます。
|
||||
|
||||
自分のコマンドをリポジトリへ移動することは、そのコマンドを信頼したものとみなされます。いま自分で見たばかりだからです。
|
||||
|
||||
## リポジトリ内のプラン
|
||||
|
||||
プランタブのプランも、Markdown ファイルとしてリポジトリに置けます。デフォルトのフォルダーは `.openchamber/plans` です。チームがすでに `docs/plans` などにプランを置いているなら、プロジェクト設定の **Plans folder** でリポジトリ内の別のフォルダーを指定します。カスタムフォルダーはデフォルトを完全に置き換えます。OpenChamber はそのフォルダーだけを読み書きするので、変更時は既存ファイルを自分で移動してください。
|
||||
|
||||
そのフォルダー内のすべての `.md` ファイルがプランタブに表示されます。ほかのツールで書いたファイルも含みます。OpenChamber で編集すると、入力したとおりにファイルが保存されます。リポジトリへ移動したプランは同一性を保つため、そのプランを添付していたセッションからも引き続き見つかります。
|
||||
|
||||
## 関連
|
||||
|
||||
- [プロジェクトアクション](/project-actions/)
|
||||
- [ワークツリー](/worktrees/)
|
||||
- [プロジェクトのノート、Todo、プラン](/notes-todos-plans/)
|
||||
@@ -25,4 +25,6 @@ description: 자주 실행하는 명령을 저장하고 클릭 한 번으로 실
|
||||
|
||||
## 관련 항목
|
||||
|
||||
- [저장소 설정](/repository-config/) — 작업과 설정 명령을 저장소에 두어 팀 전체가 사용
|
||||
|
||||
- [Preview & Dev Servers](/ko/preview/) — 실행 중인 개발 서버를 OpenChamber 안에서 여세요
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
---
|
||||
title: 저장소 설정
|
||||
description: 프로젝트 작업, 워크트리 설정 명령, 스타터, 플랜을 저장소에 두어 저장소를 받는 모든 사람이 같은 것을 사용하게 합니다.
|
||||
---
|
||||
|
||||
# 저장소 설정
|
||||
|
||||
프로젝트 작업, 워크트리 설정 명령, 초안 스타터는 기본적으로 자신의 OpenChamber 설정에 저장됩니다. 다른 사람에게는 보이지 않습니다. 저장소를 클론한 팀원도 같은 개발 서버 작업과 새 워크트리마다 같은 `bun install`을 쓰게 하고 싶다면, 해당 항목을 저장소로 옮기세요.
|
||||
|
||||
OpenChamber는 이를 저장소 루트의 `.openchamber/project.json`에 저장합니다. 이 파일은 첫 항목을 옮길 때 처음 만들어지고, 마지막 항목을 빼면 사라집니다. 다른 파일과 똑같이 커밋하면 됩니다.
|
||||
|
||||
## 무엇이 어디에 있는가
|
||||
|
||||
| 내 설정에 남는 것 | 저장소로 옮길 수 있는 것 |
|
||||
|---|---|
|
||||
| 노트와 할 일 | 프로젝트 작업 |
|
||||
| 예약 작업 | 워크트리 설정 명령 |
|
||||
| 저장소 작업 중 나만 숨긴 것 | 초안 스타터(고정한 명령과 스킬) |
|
||||
| 저장소 명령에 대한 신뢰 응답 | 플랜 |
|
||||
|
||||
노트, 할 일, 예약 작업은 내 것입니다. 저장소에 들어가지 않습니다.
|
||||
|
||||
## 항목 옮기기
|
||||
|
||||
**Settings → Projects**를 열고 프로젝트를 고릅니다. 각 작업과 각 설정 명령에는 **Move to repository** 버튼이 있고, 저장소에서 온 각 항목에는 **Move to my settings**가 있습니다. 새 세션 화면의 스타터는 마우스를 올리면 같은 두 버튼을 보여 줍니다. 플랜은 플랜 탭의 각 행에 있습니다.
|
||||
|
||||
옮기기는 말 그대로 옮기기입니다. 항목이 한쪽에서 사라지고 다른 쪽에 나타나며, 복제되지 않습니다.
|
||||
|
||||
저장소에서 온 항목에는 **In repo** 배지가 붙습니다. 저장소 작업은 **Hide for me**로 내 메뉴에서 숨길 수 있습니다. 이는 내 메뉴만 바꾸며 파일은 바꾸지 않습니다.
|
||||
|
||||
## 파일
|
||||
|
||||
```json
|
||||
{
|
||||
"version": 1,
|
||||
"setupWorktree": [
|
||||
"bun install"
|
||||
],
|
||||
"setupWorktreeWait": true,
|
||||
"projectActions": [
|
||||
{
|
||||
"id": "dev",
|
||||
"name": "Dev server",
|
||||
"command": "bun run dev",
|
||||
"icon": "rocket",
|
||||
"autoOpenUrl": true,
|
||||
"platforms": ["macos", "linux"]
|
||||
},
|
||||
{
|
||||
"id": "test",
|
||||
"name": "Tests",
|
||||
"command": "bun test"
|
||||
}
|
||||
],
|
||||
"draftStarters": [
|
||||
{ "type": "skill", "name": "triage-prs" }
|
||||
],
|
||||
"plansDir": "docs/plans"
|
||||
}
|
||||
```
|
||||
|
||||
필수 키는 `version`뿐입니다. 나머지 키는 모두 선택이며, OpenChamber는 내용이 있는 키만 기록합니다.
|
||||
|
||||
`setupWorktree`는 새 워크트리를 만든 직후 그 안에서 OpenChamber가 순서대로 실행하는 셸 명령 목록입니다. 메인 체크아웃 경로에는 `$ROOT_PROJECT_PATH`를 사용하세요. `setupWorktreeWait: true`로 두면 OpenChamber는 이 명령들이 끝난 뒤에 워크트리에서 세션을 시작합니다.
|
||||
|
||||
`projectActions`는 헤더 메뉴의 작업 목록입니다. `id`, `name`, `command`는 필수입니다. `icon`은 선택이며 없으면 play 아이콘이 쓰입니다. OpenChamber가 아는 이름은 `play`, `build`, `lint`, `terminal`, `tools`, `bug`, `flask`, `rocket`, `code`, `server`, `branch`, `search`, `settings`, `brain`, `stack`, `robot`, `command`, `file`입니다. `autoOpenUrl: true`는 명령이 출력한 주소를 엽니다([미리보기 및 개발 서버](/preview/) 참고). `platforms`는 작업을 `macos`, `linux`, `windows`로 제한합니다. `runIn: "parent"`는 현재 워크트리 대신 메인 체크아웃에서 작업을 실행합니다.
|
||||
|
||||
`draftStarters`는 명령과 스킬을 새 세션 화면에 고정합니다. 각 항목은 `{ "type": "command" | "skill", "name": "..." }` 형태이며, 해당 명령이나 스킬은 저장소의 OpenCode 설정에 있어야 합니다.
|
||||
|
||||
`plansDir`는 저장소 플랜이 있는 곳입니다. 생략하면 `.openchamber/plans`를 사용합니다. 아래를 참고하세요.
|
||||
|
||||
이 파일은 직접 써도 됩니다. 형태가 잘못된 키가 있으면 파일 전체가 무효가 되고, Projects 페이지는 조용히 무시하는 대신 이유를 알려 줍니다.
|
||||
|
||||
## 저장소 항목과 내 항목이 합쳐지는 방식
|
||||
|
||||
설정 명령은 저장소의 것이 먼저, 내 것이 그다음에 실행됩니다. Worktree 섹션의 **Use only my setup commands**에 체크하면 저장소 명령을 완전히 건너뜁니다.
|
||||
|
||||
작업은 `id`로 병합됩니다. 저장소 작업과 같은 id가 내 설정에 있으면 내 것이 대신합니다. 스타터는 이름으로 병합됩니다.
|
||||
|
||||
대기 플래그는 내가 설정했으면 내 값, 아니면 저장소 값이 쓰입니다.
|
||||
|
||||
## 신뢰
|
||||
|
||||
저장소의 설정 명령과 작업은 내 컴퓨터에서 실행되며, `git pull`로 내용이 바뀔 수 있습니다. 그래서 그중 하나가 처음 실행되려 할 때 OpenChamber는 정확한 명령을 보여 주고 묻습니다. **Trust and run**은 이 인스턴스에서 응답을 기억합니다. **Not this time**은 내 명령만 실행합니다.
|
||||
|
||||
응답은 명령 자체에 묶여 있습니다. pull로 저장소 명령이 바뀌면 새 내용에 대해 다시 묻습니다. 프로젝트 설정의 Worktree 섹션에 있는 **reset trust**로 응답을 잊게 할 수 있습니다.
|
||||
|
||||
내 명령을 저장소로 옮기는 것은 그 명령을 신뢰한 것으로 간주됩니다. 방금 직접 봤기 때문입니다.
|
||||
|
||||
## 저장소의 플랜
|
||||
|
||||
플랜 탭의 플랜도 Markdown 파일로 저장소에 둘 수 있습니다. 기본 폴더는 `.openchamber/plans`입니다. 팀이 이미 `docs/plans` 같은 곳에 플랜을 두고 있다면 프로젝트 설정의 **Plans folder**에서 저장소 안의 다른 폴더를 지정하세요. 사용자 지정 폴더는 기본값을 완전히 대체합니다. OpenChamber는 그 폴더만 읽고 쓰므로, 변경할 때 기존 파일은 직접 옮기세요.
|
||||
|
||||
그 폴더의 모든 `.md` 파일이 플랜 탭에 표시되며, 다른 도구로 쓴 파일도 포함됩니다. OpenChamber에서 편집하면 입력한 그대로 파일이 저장됩니다. 저장소로 옮긴 플랜은 정체성을 유지하므로, 그 플랜을 첨부했던 세션에서도 계속 찾을 수 있습니다.
|
||||
|
||||
## 관련 항목
|
||||
|
||||
- [프로젝트 작업](/project-actions/)
|
||||
- [워크트리](/worktrees/)
|
||||
- [프로젝트 노트, 할 일, 플랜](/notes-todos-plans/)
|
||||
@@ -25,6 +25,8 @@ Uruchamia OpenChamber w trybie headless, gdy ustawione na `true` lub `1`. Trasy
|
||||
|
||||
Nadpisuje katalog danych OpenChamber. Domyślnie jest to `~/.config/openchamber`.
|
||||
|
||||
Wszystko, co OpenChamber zapisuje, znajduje się w tym katalogu: ustawienia, dane logowania, konfiguracje projektów, motywy, plany i modele mowy. Instancja, która używała własnego katalogu przed wersją 1.23, przy pierwszym uruchomieniu otrzyma kopie folderów `projects`, `themes` i `speech-models` z `~/.config/openchamber`; oryginały pozostają na miejscu i nic nie jest scalane.
|
||||
|
||||
### `OPENCHAMBER_CHATS_DIR`
|
||||
|
||||
Przenosi katalogi zarządzanych czatów, które OpenChamber tworzy dla czatów bez projektu. Domyślnie jest to `~/.config/openchamber/chats`. Ustaw katalog, który serwer OpenCode może odczytać, gdy OpenChamber i OpenCode działają jako różni użytkownicy. Istniejące czaty nie są przenoszone.
|
||||
|
||||
@@ -25,4 +25,6 @@ Włącz **auto-open URL** dla akcji, która uruchamia serwer. OpenChamber obserw
|
||||
|
||||
## Powiązane
|
||||
|
||||
- [Konfiguracja w repozytorium](/repository-config/) — trzymaj akcje i polecenia konfiguracji w repozytorium dla całego zespołu
|
||||
|
||||
- [Podgląd i serwery deweloperskie](/pl/preview/) — otwórz działający serwer deweloperski wewnątrz OpenChamber
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
---
|
||||
title: Konfiguracja w repozytorium
|
||||
description: Trzymaj akcje projektu, polecenia konfiguracji worktree, startery i plany w repozytorium, aby dostał je każdy, kto je pobierze.
|
||||
---
|
||||
|
||||
# Konfiguracja w repozytorium
|
||||
|
||||
Akcje projektu, polecenia konfiguracji worktree i startery szkicu domyślnie żyją w Twoich własnych ustawieniach OpenChamber. Nikt inny ich nie widzi. Jeśli chcesz, aby osoba z zespołu, która sklonuje repozytorium, dostała tę samą akcję serwera deweloperskiego i to samo `bun install` w każdym nowym worktree, przenieś te elementy do repozytorium.
|
||||
|
||||
OpenChamber zapisuje je w pliku `.openchamber/project.json` w katalogu głównym repozytorium. Plik pojawia się dopiero wtedy, gdy przeniesiesz tam pierwszy element, i znika, gdy zabierzesz ostatni. Commituj go jak każdy inny plik.
|
||||
|
||||
## Co gdzie trafia
|
||||
|
||||
| Zostaje w Twoich ustawieniach | Można przenieść do repozytorium |
|
||||
|---|---|
|
||||
| Notatki i todo | Akcje projektu |
|
||||
| Zaplanowane zadania | Polecenia konfiguracji worktree |
|
||||
| Które akcje z repozytorium ukrywasz u siebie | Startery szkicu (przypięte polecenia i skille) |
|
||||
| Twoja odpowiedź o zaufaniu do poleceń z repozytorium | Plany |
|
||||
|
||||
Notatki, todo i zaplanowane zadania są Twoje. Nigdy nie trafiają do repozytorium.
|
||||
|
||||
## Przenoszenie elementu
|
||||
|
||||
Otwórz **Settings → Projects** i wybierz projekt. Każda akcja i każde polecenie konfiguracji ma przycisk **Move to repository**, a każdy element pochodzący z repozytorium ma **Move to my settings**. Startery na ekranie nowej sesji pokazują tę samą parę po najechaniu. Plany mają ją w każdym wierszu karty Plany.
|
||||
|
||||
Przeniesienie to po prostu przeniesienie. Element znika z jednego miejsca i pojawia się w drugim, nic nie jest duplikowane.
|
||||
|
||||
Elementy z repozytorium mają odznakę **In repo**. Akcje z repozytorium można ukryć ze swojego menu przyciskiem **Hide for me**. To zmienia tylko Twoje menu, nie plik.
|
||||
|
||||
## Plik
|
||||
|
||||
```json
|
||||
{
|
||||
"version": 1,
|
||||
"setupWorktree": [
|
||||
"bun install"
|
||||
],
|
||||
"setupWorktreeWait": true,
|
||||
"projectActions": [
|
||||
{
|
||||
"id": "dev",
|
||||
"name": "Dev server",
|
||||
"command": "bun run dev",
|
||||
"icon": "rocket",
|
||||
"autoOpenUrl": true,
|
||||
"platforms": ["macos", "linux"]
|
||||
},
|
||||
{
|
||||
"id": "test",
|
||||
"name": "Tests",
|
||||
"command": "bun test"
|
||||
}
|
||||
],
|
||||
"draftStarters": [
|
||||
{ "type": "skill", "name": "triage-prs" }
|
||||
],
|
||||
"plansDir": "docs/plans"
|
||||
}
|
||||
```
|
||||
|
||||
Wymagany jest tylko `version`. Wszystkie pozostałe klucze są opcjonalne, a OpenChamber zapisuje tylko te, które coś zawierają.
|
||||
|
||||
`setupWorktree` to lista poleceń powłoki, które OpenChamber uruchamia w nowym worktree zaraz po jego utworzeniu, po kolei. Użyj `$ROOT_PROJECT_PATH` jako ścieżki do głównego checkoutu. `setupWorktreeWait: true` sprawia, że OpenChamber czeka na te polecenia, zanim uruchomi sesję w worktree.
|
||||
|
||||
`projectActions` to lista akcji w menu nagłówka. `id`, `name` i `command` są wymagane. `icon` jest opcjonalna i domyślnie jest to ikona play; OpenChamber zna nazwy `play`, `build`, `lint`, `terminal`, `tools`, `bug`, `flask`, `rocket`, `code`, `server`, `branch`, `search`, `settings`, `brain`, `stack`, `robot`, `command` i `file`. `autoOpenUrl: true` otwiera adres wypisany przez polecenie, zobacz [Podgląd i serwery deweloperskie](/preview/). `platforms` ogranicza akcję do `macos`, `linux` lub `windows`. `runIn: "parent"` uruchamia akcję w głównym checkoucie zamiast w bieżącym worktree.
|
||||
|
||||
`draftStarters` przypina polecenia i skille do ekranu nowej sesji. Każdy wpis ma postać `{ "type": "command" | "skill", "name": "..." }`, a samo polecenie lub skill musi istnieć w konfiguracji OpenCode tego repozytorium.
|
||||
|
||||
`plansDir` to miejsce planów repozytorium. Pomiń go, aby używać `.openchamber/plans`. Zobacz niżej.
|
||||
|
||||
Ten plik można pisać ręcznie. Klucz o złym kształcie unieważnia cały plik, a strona Projects mówi dlaczego, zamiast go po cichu zignorować.
|
||||
|
||||
## Jak łączą się elementy z repozytorium i Twoje
|
||||
|
||||
Najpierw uruchamiane są polecenia konfiguracji z repozytorium, potem Twoje. Zaznacz **Use only my setup commands** w sekcji Worktree, aby całkowicie pominąć polecenia z repozytorium.
|
||||
|
||||
Akcje są łączone po `id`. Akcja w Twoich ustawieniach o tym samym id co akcja z repozytorium zastępuje ją. Startery są łączone po nazwie.
|
||||
|
||||
Flaga oczekiwania pochodzi z Twoich ustawień, jeśli ją ustawisz, w przeciwnym razie z repozytorium.
|
||||
|
||||
## Zaufanie
|
||||
|
||||
Polecenia konfiguracji i akcje z repozytorium uruchamiają się na Twoim komputerze, a `git pull` może je zmienić. Dlatego za pierwszym razem, gdy któreś z nich ma się uruchomić, OpenChamber pokazuje dokładną treść poleceń i pyta. **Trust and run** zapamiętuje odpowiedź w tej instancji. **Not this time** uruchamia tylko Twoje własne polecenia.
|
||||
|
||||
Odpowiedź jest związana z samymi poleceniami. Gdy pull zmieni polecenie z repozytorium, pytanie wraca dla nowej treści. Odpowiedź możesz zapomnieć przyciskiem **reset trust** w sekcji Worktree ustawień projektu.
|
||||
|
||||
Przeniesienie własnego polecenia do repozytorium liczy się jako zaufanie, bo właśnie je widziałeś.
|
||||
|
||||
## Plany w repozytorium
|
||||
|
||||
Plany z karty Plany też mogą żyć w repozytorium jako pliki Markdown. Domyślny folder to `.openchamber/plans`. Ustaw **Plans folder** w ustawieniach projektu, aby użyć innego folderu w repozytorium, na przykład `docs/plans`, jeśli zespół już trzyma tam plany. Własny folder całkowicie zastępuje domyślny: OpenChamber czyta i zapisuje tylko w nim, więc przy zmianie przenieś istniejące pliki samodzielnie.
|
||||
|
||||
Każdy plik `.md` w tym folderze pojawia się w karcie Plany, także pliki zapisane przez inne narzędzia. Edycja w OpenChamber zapisuje plik tak, jak go wpisałeś. Plan przeniesiony do repozytorium zachowuje tożsamość, więc sesje, do których był dołączony, nadal go znajdują.
|
||||
|
||||
## Powiązane
|
||||
|
||||
- [Akcje projektu](/project-actions/)
|
||||
- [Worktrees](/worktrees/)
|
||||
- [Notatki, todo i plany projektu](/notes-todos-plans/)
|
||||
@@ -25,4 +25,6 @@ Turn on **auto-open URL** for an action that starts a server. OpenChamber watche
|
||||
|
||||
## Related
|
||||
|
||||
- [Repository config](/repository-config/) — keep actions and setup commands in the repository for the whole team
|
||||
|
||||
- [Preview & Dev Servers](/preview/) — open a running dev server inside OpenChamber
|
||||
|
||||
@@ -25,4 +25,6 @@ Ative **auto-open URL** para uma ação que inicia um servidor. O OpenChamber ob
|
||||
|
||||
## Relacionado
|
||||
|
||||
- [Configuração no repositório](/repository-config/) — guarde ações e comandos de configuração no repositório para toda a equipe
|
||||
|
||||
- [Preview e Servidores de Desenvolvimento](/pt-br/preview/) — abra um servidor de desenvolvimento em execução dentro do OpenChamber
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
---
|
||||
title: Configuração no repositório
|
||||
description: Guarde ações do projeto, comandos de configuração de worktree, iniciadores e planos no repositório para que todos que o baixarem os tenham.
|
||||
---
|
||||
|
||||
# Configuração no repositório
|
||||
|
||||
Ações do projeto, comandos de configuração de worktree e iniciadores de rascunho ficam por padrão nas suas próprias configurações do OpenChamber. Ninguém mais os vê. Se você quer que quem clonar o repositório tenha a mesma ação de servidor de desenvolvimento e o mesmo `bun install` em cada worktree novo, mova esses itens para o repositório.
|
||||
|
||||
O OpenChamber os guarda em `.openchamber/project.json` na raiz do repositório. O arquivo só aparece quando você move o primeiro item para lá e some quando você tira o último. Faça commit dele como de qualquer outro arquivo.
|
||||
|
||||
## O que vai para onde
|
||||
|
||||
| Fica nas suas configurações | Pode ir para o repositório |
|
||||
|---|---|
|
||||
| Notas e tarefas | Ações do projeto |
|
||||
| Tarefas agendadas | Comandos de configuração de worktree |
|
||||
| Quais ações do repositório você ocultou para si | Iniciadores de rascunho (comandos e skills fixados) |
|
||||
| Sua resposta de confiança para os comandos do repositório | Planos |
|
||||
|
||||
Notas, tarefas e tarefas agendadas são suas. Nunca vão parar no repositório.
|
||||
|
||||
## Mover um item
|
||||
|
||||
Abra **Settings → Projects** e escolha o projeto. Cada ação e cada comando de configuração tem um botão **Move to repository**, e cada item que veio do repositório tem **Move to my settings**. Os iniciadores da tela de nova sessão mostram o mesmo par ao passar o mouse. Os planos têm isso em cada linha da aba Planos.
|
||||
|
||||
Mover é só isso. O item sai de um lugar e chega no outro, nada é duplicado.
|
||||
|
||||
Itens do repositório mostram o selo **In repo**. Ações do repositório também podem ser ocultadas do seu menu com **Hide for me**. Isso muda só o seu menu, não o arquivo.
|
||||
|
||||
## O arquivo
|
||||
|
||||
```json
|
||||
{
|
||||
"version": 1,
|
||||
"setupWorktree": [
|
||||
"bun install"
|
||||
],
|
||||
"setupWorktreeWait": true,
|
||||
"projectActions": [
|
||||
{
|
||||
"id": "dev",
|
||||
"name": "Dev server",
|
||||
"command": "bun run dev",
|
||||
"icon": "rocket",
|
||||
"autoOpenUrl": true,
|
||||
"platforms": ["macos", "linux"]
|
||||
},
|
||||
{
|
||||
"id": "test",
|
||||
"name": "Tests",
|
||||
"command": "bun test"
|
||||
}
|
||||
],
|
||||
"draftStarters": [
|
||||
{ "type": "skill", "name": "triage-prs" }
|
||||
],
|
||||
"plansDir": "docs/plans"
|
||||
}
|
||||
```
|
||||
|
||||
Só `version` é obrigatório. Todas as outras chaves são opcionais, e o OpenChamber grava apenas as que têm algo.
|
||||
|
||||
`setupWorktree` é a lista de comandos de shell que o OpenChamber roda dentro de um worktree novo logo depois de criá-lo, em ordem. Use `$ROOT_PROJECT_PATH` para o caminho do checkout principal. `setupWorktreeWait: true` faz o OpenChamber esperar esses comandos antes de iniciar uma sessão no worktree.
|
||||
|
||||
`projectActions` é a lista de ações do menu do cabeçalho. `id`, `name` e `command` são obrigatórios. `icon` é opcional e cai no ícone de play; os nomes que o OpenChamber conhece são `play`, `build`, `lint`, `terminal`, `tools`, `bug`, `flask`, `rocket`, `code`, `server`, `branch`, `search`, `settings`, `brain`, `stack`, `robot`, `command` e `file`. `autoOpenUrl: true` abre o endereço que o comando imprime, veja [Pré-visualização e servidores de desenvolvimento](/preview/). `platforms` limita a ação a `macos`, `linux` ou `windows`. `runIn: "parent"` roda a ação no checkout principal em vez do worktree atual.
|
||||
|
||||
`draftStarters` fixa comandos e skills na tela de nova sessão. Cada entrada é `{ "type": "command" | "skill", "name": "..." }`, e o comando ou skill precisa existir na configuração do OpenCode do repositório.
|
||||
|
||||
`plansDir` é onde ficam os planos do repositório. Omita para usar `.openchamber/plans`. Veja abaixo.
|
||||
|
||||
Você pode escrever esse arquivo à mão. Uma chave com formato errado invalida o arquivo inteiro, e a página Projects diz o motivo em vez de ignorar em silêncio.
|
||||
|
||||
## Como itens do repositório e os seus se combinam
|
||||
|
||||
Os comandos de configuração do repositório rodam primeiro, depois os seus. Marque **Use only my setup commands** na seção Worktree para pular por completo os comandos do repositório.
|
||||
|
||||
As ações são combinadas por `id`. Uma ação nas suas configurações com o mesmo id de uma ação do repositório a substitui. Iniciadores são combinados por nome.
|
||||
|
||||
A marca de espera vem das suas configurações quando você a definiu, senão do repositório.
|
||||
|
||||
## Confiança
|
||||
|
||||
Comandos de configuração e ações do repositório rodam na sua máquina, e um `git pull` pode mudá-los. Por isso, na primeira vez que um deles está prestes a rodar, o OpenChamber mostra os comandos exatos e pergunta. **Trust and run** guarda sua resposta nesta instância. **Not this time** roda só os seus próprios comandos.
|
||||
|
||||
A resposta fica presa aos comandos em si. Quando um pull muda um comando do repositório, a pergunta volta para o texto novo. Você pode esquecer a resposta com **reset trust** na seção Worktree das configurações do projeto.
|
||||
|
||||
Mover um comando seu para o repositório conta como confiar nele, já que você acabou de vê-lo.
|
||||
|
||||
## Planos no repositório
|
||||
|
||||
Os planos da aba Planos também podem ficar no repositório, como arquivos Markdown. A pasta padrão é `.openchamber/plans`. Defina **Plans folder** nas configurações do projeto para usar outra pasta dentro do repositório, por exemplo `docs/plans` se a equipe já guarda planos ali. Uma pasta própria substitui a padrão por completo: o OpenChamber lê e grava só nessa pasta, então mova você mesmo os arquivos existentes ao trocar.
|
||||
|
||||
Todo arquivo `.md` dessa pasta aparece na aba Planos, inclusive os escritos por outras ferramentas. Editar um deles no OpenChamber salva o arquivo como você digitou. Um plano que você move para o repositório mantém a identidade, então as sessões que o tinham anexado continuam encontrando.
|
||||
|
||||
## Relacionado
|
||||
|
||||
- [Ações do projeto](/project-actions/)
|
||||
- [Worktrees](/worktrees/)
|
||||
- [Notas, tarefas e planos do projeto](/notes-todos-plans/)
|
||||
@@ -0,0 +1,100 @@
|
||||
---
|
||||
title: Repository config
|
||||
description: Keep project actions, worktree setup commands, starters, and plans in the repository so everyone who pulls it gets them.
|
||||
---
|
||||
|
||||
# Repository config
|
||||
|
||||
Project actions, worktree setup commands, and draft starters live in your own OpenChamber settings by default. Nobody else sees them. If you want a teammate who clones the repository to get the same dev server action and the same `bun install` on every new worktree, move those items into the repository.
|
||||
|
||||
OpenChamber stores them in `.openchamber/project.json` at the repository root. The file appears only when you move the first item there, and it goes away again when you move the last one out. Commit it like any other file.
|
||||
|
||||
## What goes where
|
||||
|
||||
| Stays in your settings | Can move to the repository |
|
||||
|---|---|
|
||||
| Notes and todos | Project actions |
|
||||
| Scheduled tasks | Worktree setup commands |
|
||||
| Which repository action is hidden for you | Draft starters (pinned commands and skills) |
|
||||
| Your trust answer for repository commands | Plans |
|
||||
|
||||
Notes, todos, and scheduled tasks are yours. They never end up in the repository.
|
||||
|
||||
## Moving an item
|
||||
|
||||
Open **Settings → Projects** and pick the project. Every action and setup command has a **Move to repository** button, and every item that came from the repository has **Move to my settings**. Starters on the new session screen show the same pair on hover. Plans have it on each row of the Plans tab.
|
||||
|
||||
A move is just that. The item leaves one place and lands in the other, so nothing is duplicated.
|
||||
|
||||
Items from the repository show an **In repo** badge. Repository actions can also be hidden from your menu with **Hide for me**. That only changes your menu, not the file.
|
||||
|
||||
## The file
|
||||
|
||||
```json
|
||||
{
|
||||
"version": 1,
|
||||
"setupWorktree": [
|
||||
"bun install"
|
||||
],
|
||||
"setupWorktreeWait": true,
|
||||
"projectActions": [
|
||||
{
|
||||
"id": "dev",
|
||||
"name": "Dev server",
|
||||
"command": "bun run dev",
|
||||
"icon": "rocket",
|
||||
"autoOpenUrl": true,
|
||||
"platforms": ["macos", "linux"]
|
||||
},
|
||||
{
|
||||
"id": "test",
|
||||
"name": "Tests",
|
||||
"command": "bun test"
|
||||
}
|
||||
],
|
||||
"draftStarters": [
|
||||
{ "type": "skill", "name": "triage-prs" }
|
||||
],
|
||||
"plansDir": "docs/plans"
|
||||
}
|
||||
```
|
||||
|
||||
Only `version` is required. Every other key is optional, and OpenChamber writes only the keys that carry something.
|
||||
|
||||
`setupWorktree` is the list of shell commands OpenChamber runs inside a new worktree right after creating it, in order. Use `$ROOT_PROJECT_PATH` for the main checkout's path. `setupWorktreeWait: true` makes OpenChamber wait for these commands before it starts a session in the worktree.
|
||||
|
||||
`projectActions` is the list of actions in the header menu. `id`, `name`, and `command` are required. `icon` is optional and falls back to a play icon; the names OpenChamber knows are `play`, `build`, `lint`, `terminal`, `tools`, `bug`, `flask`, `rocket`, `code`, `server`, `branch`, `search`, `settings`, `brain`, `stack`, `robot`, `command`, and `file`. `autoOpenUrl: true` opens the address the command prints, see [Preview & Dev Servers](/preview/). `platforms` limits the action to `macos`, `linux`, or `windows`. `runIn: "parent"` runs the action in the main checkout instead of the current worktree.
|
||||
|
||||
`draftStarters` pins commands and skills to the new session screen. Each entry is `{ "type": "command" | "skill", "name": "..." }`, and the command or skill itself has to exist in the repository's OpenCode config.
|
||||
|
||||
`plansDir` is where repository plans live. Leave it out to use `.openchamber/plans`. See below.
|
||||
|
||||
You can write this file by hand. A key with the wrong shape makes the whole file invalid, and the Projects page tells you why instead of silently ignoring it.
|
||||
|
||||
## How repository and personal items combine
|
||||
|
||||
Repository setup commands run first, then your own. Tick **Use only my setup commands** in the Worktree section to skip the repository's commands altogether.
|
||||
|
||||
Actions are merged by `id`. An action in your settings with the same id as a repository action replaces it. Starters are merged by name.
|
||||
|
||||
The wait flag comes from your settings when you have set it, otherwise from the repository.
|
||||
|
||||
## Trust
|
||||
|
||||
Setup commands and actions from the repository run on your machine, and a `git pull` can change them. So the first time one of them is about to run, OpenChamber shows the exact commands and asks. **Trust and run** remembers your answer on this instance. **Not this time** runs only your own commands.
|
||||
|
||||
The answer is tied to the commands themselves. When a pull changes a repository command, the question comes back for the new text. You can forget the answer with **reset trust** in the Worktree section of the project's settings.
|
||||
|
||||
Moving your own command into the repository counts as trusting it, since you have just seen it.
|
||||
|
||||
## Plans in the repository
|
||||
|
||||
Plans on the Plans tab can also live in the repository, as Markdown files. The folder is `.openchamber/plans` by default. Set **Plans folder** in the project's settings to use another folder inside the repository, for example `docs/plans` if your team already keeps plans there. A custom folder replaces the default completely: OpenChamber reads and writes only that folder, so move existing files yourself when you change it.
|
||||
|
||||
Every `.md` file in that folder shows on the Plans tab, including files written by other tools. Editing one in OpenChamber saves the file as you typed it. A plan you move into the repository keeps its identity, so sessions that had it attached still find it.
|
||||
|
||||
## Related
|
||||
|
||||
- [Project Actions](/project-actions/)
|
||||
- [Worktrees](/worktrees/)
|
||||
- [Project Notes, Todos & Plans](/notes-todos-plans/)
|
||||
@@ -25,4 +25,6 @@ Sunucu başlatan bir eylem için **auto-open URL** seçeneğini açın. OpenCham
|
||||
|
||||
## İlgili
|
||||
|
||||
- [Depo yapılandırması](/repository-config/) — eylemleri ve kurulum komutlarını tüm ekip için depoda tutun
|
||||
|
||||
- [Preview & Dev Servers](/preview/) — çalışan bir geliştirme sunucusunu OpenChamber içinde açın
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
---
|
||||
title: Depo yapılandırması
|
||||
description: Proje eylemlerini, worktree kurulum komutlarını, başlatıcıları ve planları depoda tutun; depoyu çeken herkes aynısını alsın.
|
||||
---
|
||||
|
||||
# Depo yapılandırması
|
||||
|
||||
Proje eylemleri, worktree kurulum komutları ve taslak başlatıcıları varsayılan olarak kendi OpenChamber ayarlarında yaşar. Başka kimse görmez. Depoyu klonlayan bir ekip arkadaşının aynı geliştirme sunucusu eylemini ve her yeni worktree'de aynı `bun install` komutunu almasını istiyorsan, bu öğeleri depoya taşı.
|
||||
|
||||
OpenChamber bunları deponun kökündeki `.openchamber/project.json` dosyasında saklar. Dosya, ilk öğeyi oraya taşıdığında ortaya çıkar ve son öğeyi geri aldığında kaybolur. Diğer dosyalar gibi commit'le.
|
||||
|
||||
## Ne nereye gider
|
||||
|
||||
| Ayarlarında kalır | Depoya taşınabilir |
|
||||
|---|---|
|
||||
| Notlar ve yapılacaklar | Proje eylemleri |
|
||||
| Zamanlanmış görevler | Worktree kurulum komutları |
|
||||
| Kendin için gizlediğin depo eylemleri | Taslak başlatıcıları (sabitlenmiş komutlar ve skill'ler) |
|
||||
| Depo komutları için güven yanıtın | Planlar |
|
||||
|
||||
Notlar, yapılacaklar ve zamanlanmış görevler senindir. Asla depoya girmez.
|
||||
|
||||
## Bir öğeyi taşıma
|
||||
|
||||
**Settings → Projects** bölümünü aç ve projeyi seç. Her eylemin ve her kurulum komutunun bir **Move to repository** düğmesi, depodan gelen her öğenin de **Move to my settings** düğmesi vardır. Yeni oturum ekranındaki başlatıcılar üzerine gelince aynı ikiliyi gösterir. Planlarda bu, Planlar sekmesindeki her satırda bulunur.
|
||||
|
||||
Taşımak tam olarak taşımaktır. Öğe bir yerden çıkar, diğerine gider; hiçbir şey çoğaltılmaz.
|
||||
|
||||
Depodan gelen öğeler **In repo** rozeti taşır. Depo eylemleri **Hide for me** ile menünden gizlenebilir. Bu yalnızca senin menünü değiştirir, dosyayı değil.
|
||||
|
||||
## Dosya
|
||||
|
||||
```json
|
||||
{
|
||||
"version": 1,
|
||||
"setupWorktree": [
|
||||
"bun install"
|
||||
],
|
||||
"setupWorktreeWait": true,
|
||||
"projectActions": [
|
||||
{
|
||||
"id": "dev",
|
||||
"name": "Dev server",
|
||||
"command": "bun run dev",
|
||||
"icon": "rocket",
|
||||
"autoOpenUrl": true,
|
||||
"platforms": ["macos", "linux"]
|
||||
},
|
||||
{
|
||||
"id": "test",
|
||||
"name": "Tests",
|
||||
"command": "bun test"
|
||||
}
|
||||
],
|
||||
"draftStarters": [
|
||||
{ "type": "skill", "name": "triage-prs" }
|
||||
],
|
||||
"plansDir": "docs/plans"
|
||||
}
|
||||
```
|
||||
|
||||
Yalnızca `version` zorunludur. Diğer tüm anahtarlar isteğe bağlıdır ve OpenChamber yalnızca içinde bir şey olanları yazar.
|
||||
|
||||
`setupWorktree`, OpenChamber'ın yeni bir worktree oluşturduktan hemen sonra içinde sırayla çalıştırdığı kabuk komutlarının listesidir. Ana checkout yolu için `$ROOT_PROJECT_PATH` kullan. `setupWorktreeWait: true`, OpenChamber'ın worktree'de oturum başlatmadan önce bu komutları beklemesini sağlar.
|
||||
|
||||
`projectActions`, başlık menüsündeki eylemlerin listesidir. `id`, `name` ve `command` zorunludur. `icon` isteğe bağlıdır ve verilmezse play simgesi kullanılır; OpenChamber'ın bildiği adlar `play`, `build`, `lint`, `terminal`, `tools`, `bug`, `flask`, `rocket`, `code`, `server`, `branch`, `search`, `settings`, `brain`, `stack`, `robot`, `command` ve `file`. `autoOpenUrl: true`, komutun yazdırdığı adresi açar; bkz. [Önizleme ve geliştirme sunucuları](/preview/). `platforms`, eylemi `macos`, `linux` veya `windows` ile sınırlar. `runIn: "parent"`, eylemi geçerli worktree yerine ana checkout'ta çalıştırır.
|
||||
|
||||
`draftStarters`, komutları ve skill'leri yeni oturum ekranına sabitler. Her giriş `{ "type": "command" | "skill", "name": "..." }` biçimindedir ve komutun ya da skill'in kendisi deponun OpenCode yapılandırmasında bulunmalıdır.
|
||||
|
||||
`plansDir`, depo planlarının bulunduğu yerdir. `.openchamber/plans` kullanmak için atla. Aşağıya bak.
|
||||
|
||||
Bu dosyayı elle yazabilirsin. Yanlış biçimli bir anahtar tüm dosyayı geçersiz kılar ve Projects sayfası sessizce yok saymak yerine nedenini söyler.
|
||||
|
||||
## Depo öğeleriyle kendi öğelerin nasıl birleşir
|
||||
|
||||
Önce depodaki kurulum komutları, sonra seninkiler çalışır. Depodakileri tamamen atlamak için Worktree bölümünde **Use only my setup commands** kutusunu işaretle.
|
||||
|
||||
Eylemler `id` ile birleştirilir. Ayarlarında depo eylemiyle aynı id'ye sahip bir eylem varsa onun yerine geçer. Başlatıcılar ada göre birleştirilir.
|
||||
|
||||
Bekleme bayrağı, ayarladıysan senin ayarlarından, yoksa depodan gelir.
|
||||
|
||||
## Güven
|
||||
|
||||
Depodaki kurulum komutları ve eylemler senin makinende çalışır ve bir `git pull` bunları değiştirebilir. Bu yüzden biri ilk kez çalışmak üzereyken OpenChamber komutları olduğu gibi gösterir ve sorar. **Trust and run**, yanıtını bu örnekte hatırlar. **Not this time** yalnızca senin komutlarını çalıştırır.
|
||||
|
||||
Yanıt komutların kendisine bağlıdır. Bir pull depodaki bir komutu değiştirdiğinde soru yeni metin için geri gelir. Proje ayarlarının Worktree bölümündeki **reset trust** ile yanıtı unutturabilirsin.
|
||||
|
||||
Kendi komutunu depoya taşımak ona güvenmek sayılır; onu az önce gördün.
|
||||
|
||||
## Depodaki planlar
|
||||
|
||||
Planlar sekmesindeki planlar da Markdown dosyaları olarak depoda yaşayabilir. Varsayılan klasör `.openchamber/plans`'tır. Ekibin planları zaten `docs/plans` gibi bir yerde tutuyorsa, proje ayarlarındaki **Plans folder** ile depo içinde başka bir klasör belirle. Özel bir klasör varsayılanı tamamen değiştirir: OpenChamber yalnızca o klasörü okur ve yazar, bu yüzden değiştirdiğinde mevcut dosyaları kendin taşı.
|
||||
|
||||
O klasördeki her `.md` dosyası Planlar sekmesinde görünür; başka araçlarla yazılanlar da dahil. OpenChamber'da düzenlemek dosyayı yazdığın gibi kaydeder. Depoya taşıdığın bir plan kimliğini korur, böylece onu eklemiş oturumlar onu bulmaya devam eder.
|
||||
|
||||
## İlgili
|
||||
|
||||
- [Proje işlemleri](/project-actions/)
|
||||
- [Worktree'ler](/worktrees/)
|
||||
- [Proje notları, yapılacaklar ve planlar](/notes-todos-plans/)
|
||||
@@ -25,4 +25,6 @@ description: Зберігайте команди, які часто запуск
|
||||
|
||||
## Пов'язане
|
||||
|
||||
- [Конфіг у репозиторії](/repository-config/) — тримайте дії й команди налаштування в репозиторії для всієї команди
|
||||
|
||||
- [Перегляд і dev-сервери](/uk/preview/) — відкрийте запущений dev-сервер усередині OpenChamber
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
---
|
||||
title: Конфіг у репозиторії
|
||||
description: Тримайте дії проєкту, команди налаштування worktree, стартери й плани в репозиторії, щоб їх отримував кожен, хто його клонує.
|
||||
---
|
||||
|
||||
# Конфіг у репозиторії
|
||||
|
||||
Дії проєкту, команди налаштування worktree і стартери чернетки за замовчуванням живуть у ваших власних налаштуваннях OpenChamber. Ніхто інший їх не бачить. Якщо ви хочете, щоб колега, який клонує репозиторій, отримав ту саму дію для dev-сервера і той самий `bun install` у кожному новому worktree, перенесіть ці елементи в репозиторій.
|
||||
|
||||
OpenChamber зберігає їх у файлі `.openchamber/project.json` у корені репозиторію. Файл з'являється лише тоді, коли ви переносите туди перший елемент, і зникає, коли забираєте останній. Комітьте його як звичайний файл.
|
||||
|
||||
## Що де лежить
|
||||
|
||||
| Лишається у ваших налаштуваннях | Можна перенести в репозиторій |
|
||||
|---|---|
|
||||
| Нотатки й todo | Дії проєкту |
|
||||
| Заплановані задачі | Команди налаштування worktree |
|
||||
| Які дії з репозиторію ви сховали для себе | Стартери чернетки (закріплені команди й скіли) |
|
||||
| Ваша відповідь про довіру до команд із репозиторію | Плани |
|
||||
|
||||
Нотатки, todo і заплановані задачі ваші. Вони ніколи не потрапляють у репозиторій.
|
||||
|
||||
## Перенесення елемента
|
||||
|
||||
Відкрийте **Settings → Projects** і виберіть проєкт. У кожної дії та команди налаштування є кнопка **Move to repository**, а в кожного елемента з репозиторію — **Move to my settings**. Стартери на екрані нової сесії показують ту саму пару при наведенні. У планів вона є в кожному рядку вкладки «Плани».
|
||||
|
||||
Перенесення — це саме перенесення. Елемент зникає з одного місця і з'являється в іншому, нічого не дублюється.
|
||||
|
||||
Елементи з репозиторію мають бейдж **In repo**. Дії з репозиторію можна сховати зі свого меню кнопкою **Hide for me**. Це змінює лише ваше меню, не файл.
|
||||
|
||||
## Файл
|
||||
|
||||
```json
|
||||
{
|
||||
"version": 1,
|
||||
"setupWorktree": [
|
||||
"bun install"
|
||||
],
|
||||
"setupWorktreeWait": true,
|
||||
"projectActions": [
|
||||
{
|
||||
"id": "dev",
|
||||
"name": "Dev server",
|
||||
"command": "bun run dev",
|
||||
"icon": "rocket",
|
||||
"autoOpenUrl": true,
|
||||
"platforms": ["macos", "linux"]
|
||||
},
|
||||
{
|
||||
"id": "test",
|
||||
"name": "Tests",
|
||||
"command": "bun test"
|
||||
}
|
||||
],
|
||||
"draftStarters": [
|
||||
{ "type": "skill", "name": "triage-prs" }
|
||||
],
|
||||
"plansDir": "docs/plans"
|
||||
}
|
||||
```
|
||||
|
||||
Обов'язковий лише `version`. Усі інші ключі необов'язкові, і OpenChamber записує тільки ті, що щось містять.
|
||||
|
||||
`setupWorktree` — список shell-команд, які OpenChamber виконує всередині нового worktree одразу після його створення, по порядку. Використовуйте `$ROOT_PROJECT_PATH` для шляху до основного checkout. `setupWorktreeWait: true` змушує OpenChamber дочекатися цих команд, перш ніж запускати сесію у worktree.
|
||||
|
||||
`projectActions` — список дій у меню заголовка. `id`, `name` і `command` обов'язкові. `icon` необов'язкова і за замовчуванням це іконка play; OpenChamber знає такі назви: `play`, `build`, `lint`, `terminal`, `tools`, `bug`, `flask`, `rocket`, `code`, `server`, `branch`, `search`, `settings`, `brain`, `stack`, `robot`, `command` і `file`. `autoOpenUrl: true` відкриває адресу, яку виводить команда, див. [Перегляд і dev-сервери](/preview/). `platforms` обмежує дію до `macos`, `linux` або `windows`. `runIn: "parent"` виконує дію в основному checkout, а не в поточному worktree.
|
||||
|
||||
`draftStarters` закріплює команди й скіли на екрані нової сесії. Кожен запис має вигляд `{ "type": "command" | "skill", "name": "..." }`, а сама команда чи скіл мають існувати в конфігу OpenCode цього репозиторію.
|
||||
|
||||
`plansDir` — де лежать плани репозиторію. Пропустіть, щоб використовувати `.openchamber/plans`. Див. нижче.
|
||||
|
||||
Цей файл можна писати руками. Ключ неправильної форми робить увесь файл недійсним, і сторінка Projects каже чому, замість того щоб мовчки його проігнорувати.
|
||||
|
||||
## Як поєднуються елементи з репозиторію і ваші
|
||||
|
||||
Спершу виконуються команди налаштування з репозиторію, потім ваші. Позначте **Use only my setup commands** у секції Worktree, щоб узагалі пропустити команди з репозиторію.
|
||||
|
||||
Дії зливаються за `id`. Дія у ваших налаштуваннях із таким самим id, як у репозиторії, замінює її. Стартери зливаються за назвою.
|
||||
|
||||
Прапорець очікування береться з ваших налаштувань, якщо ви його задали, інакше з репозиторію.
|
||||
|
||||
## Довіра
|
||||
|
||||
Команди налаштування й дії з репозиторію виконуються на вашому комп'ютері, а `git pull` може їх змінити. Тому першого разу, коли одна з них ось-ось виконається, OpenChamber показує точний текст команд і питає. **Trust and run** запам'ятовує вашу відповідь на цьому інстансі. **Not this time** виконує лише ваші власні команди.
|
||||
|
||||
Відповідь прив'язана до самих команд. Коли pull змінює команду з репозиторію, питання повертається для нового тексту. Забути відповідь можна кнопкою **reset trust** у секції Worktree в налаштуваннях проєкту.
|
||||
|
||||
Перенесення власної команди в репозиторій рахується як довіра до неї, адже ви її щойно бачили.
|
||||
|
||||
## Плани в репозиторії
|
||||
|
||||
Плани з вкладки «Плани» теж можуть жити в репозиторії як файли Markdown. За замовчуванням це тека `.openchamber/plans`. Задайте **Plans folder** у налаштуваннях проєкту, щоб використати іншу теку всередині репозиторію, наприклад `docs/plans`, якщо команда вже тримає плани там. Своя тека повністю замінює типову: OpenChamber читає й пише лише в неї, тож при зміні перенесіть наявні файли самі.
|
||||
|
||||
Кожен файл `.md` у цій теці з'являється на вкладці «Плани», включно з файлами, які написали інші інструменти. Редагування в OpenChamber зберігає файл так, як ви його набрали. План, перенесений у репозиторій, зберігає свою ідентичність, тож сесії, до яких він був прикріплений, і далі його знаходять.
|
||||
|
||||
## Пов'язане
|
||||
|
||||
- [Дії проєкту](/project-actions/)
|
||||
- [Worktrees](/worktrees/)
|
||||
- [Нотатки, todo і плани проєкту](/notes-todos-plans/)
|
||||
@@ -25,6 +25,8 @@ OpenChamber web 服务器监听的地址。使用 `0.0.0.0` 可允许其他机
|
||||
|
||||
覆盖 OpenChamber 数据目录。默认是 `~/.config/openchamber`。
|
||||
|
||||
OpenChamber 存储的所有内容都位于此目录下:设置、认证、项目配置、主题、计划和语音模型。在 1.23 之前使用自定义目录的实例会在首次启动时将 `projects`、`themes` 和 `speech-models` 文件夹从 `~/.config/openchamber` 复制到此目录;原文件夹保持不变,不会合并任何内容。
|
||||
|
||||
### `OPENCHAMBER_CHATS_DIR`
|
||||
|
||||
更改 OpenChamber 为无项目聊天创建的托管聊天目录的位置。默认是 `~/.config/openchamber/chats`。当 OpenChamber 和 OpenCode 以不同用户运行时,请设置为 OpenCode 服务器可读取的目录。现有聊天不会被移动。
|
||||
|
||||
@@ -25,4 +25,6 @@ description: 保存你经常运行的命令,一键启动它们。
|
||||
|
||||
## 相关内容
|
||||
|
||||
- [仓库配置](/repository-config/) — 把操作和设置命令放进仓库,供整个团队使用
|
||||
|
||||
- [预览与开发服务器](/zh-cn/preview/) — 在 OpenChamber 内部打开正在运行的开发服务器
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
---
|
||||
title: 仓库配置
|
||||
description: 把项目操作、工作树设置命令、启动项和计划放进仓库,让拉取仓库的每个人都能获得。
|
||||
---
|
||||
|
||||
# 仓库配置
|
||||
|
||||
项目操作、工作树设置命令和草稿启动项默认保存在你自己的 OpenChamber 设置里。别人看不到它们。如果你希望克隆仓库的队友也拥有同样的开发服务器操作,以及每个新工作树里同样的 `bun install`,就把这些项目移到仓库中。
|
||||
|
||||
OpenChamber 把它们存放在仓库根目录的 `.openchamber/project.json` 里。只有当你把第一个项目移进去时这个文件才会出现,移出最后一个项目时它会消失。像提交其他文件一样提交它即可。
|
||||
|
||||
## 什么放在哪里
|
||||
|
||||
| 留在你的设置里 | 可以移到仓库 |
|
||||
|---|---|
|
||||
| 笔记和待办 | 项目操作 |
|
||||
| 定时任务 | 工作树设置命令 |
|
||||
| 你为自己隐藏了哪些仓库操作 | 草稿启动项(固定的命令和技能) |
|
||||
| 你对仓库命令的信任回答 | 计划 |
|
||||
|
||||
笔记、待办和定时任务是你的。它们永远不会进入仓库。
|
||||
|
||||
## 移动项目
|
||||
|
||||
打开 **Settings → Projects** 并选择项目。每个操作和每条设置命令都有 **Move to repository** 按钮,每个来自仓库的项目都有 **Move to my settings**。新会话界面上的启动项在悬停时显示同样的一对按钮。计划则在“计划”标签的每一行里。
|
||||
|
||||
移动就是移动。项目离开一处,落到另一处,不会产生副本。
|
||||
|
||||
来自仓库的项目带有 **In repo** 徽章。仓库操作还可以用 **Hide for me** 从你的菜单中隐藏。这只改变你的菜单,不改变文件。
|
||||
|
||||
## 文件
|
||||
|
||||
```json
|
||||
{
|
||||
"version": 1,
|
||||
"setupWorktree": [
|
||||
"bun install"
|
||||
],
|
||||
"setupWorktreeWait": true,
|
||||
"projectActions": [
|
||||
{
|
||||
"id": "dev",
|
||||
"name": "Dev server",
|
||||
"command": "bun run dev",
|
||||
"icon": "rocket",
|
||||
"autoOpenUrl": true,
|
||||
"platforms": ["macos", "linux"]
|
||||
},
|
||||
{
|
||||
"id": "test",
|
||||
"name": "Tests",
|
||||
"command": "bun test"
|
||||
}
|
||||
],
|
||||
"draftStarters": [
|
||||
{ "type": "skill", "name": "triage-prs" }
|
||||
],
|
||||
"plansDir": "docs/plans"
|
||||
}
|
||||
```
|
||||
|
||||
只有 `version` 是必填的。其余键都是可选的,OpenChamber 只写入有内容的键。
|
||||
|
||||
`setupWorktree` 是 OpenChamber 在创建新工作树后立即在其中按顺序运行的 shell 命令列表。主检出路径用 `$ROOT_PROJECT_PATH` 表示。`setupWorktreeWait: true` 会让 OpenChamber 等这些命令完成后再在工作树中启动会话。
|
||||
|
||||
`projectActions` 是头部菜单中的操作列表。`id`、`name` 和 `command` 是必填的。`icon` 可选,缺省时使用 play 图标;OpenChamber 认识的名称有 `play`、`build`、`lint`、`terminal`、`tools`、`bug`、`flask`、`rocket`、`code`、`server`、`branch`、`search`、`settings`、`brain`、`stack`、`robot`、`command` 和 `file`。`autoOpenUrl: true` 会打开命令输出的地址,见[预览与开发服务器](/preview/)。`platforms` 把操作限制在 `macos`、`linux` 或 `windows`。`runIn: "parent"` 在主检出而不是当前工作树中运行操作。
|
||||
|
||||
`draftStarters` 把命令和技能固定到新会话界面。每一项形如 `{ "type": "command" | "skill", "name": "..." }`,命令或技能本身必须存在于仓库的 OpenCode 配置中。
|
||||
|
||||
`plansDir` 是仓库计划所在的位置。省略则使用 `.openchamber/plans`。见下文。
|
||||
|
||||
这个文件可以手写。某个键的形状不对会使整个文件无效,Projects 页面会告诉你原因,而不是悄悄忽略它。
|
||||
|
||||
## 仓库项目与你自己的项目如何合并
|
||||
|
||||
先运行仓库的设置命令,再运行你自己的。在 Worktree 区域勾选 **Use only my setup commands** 可以完全跳过仓库的命令。
|
||||
|
||||
操作按 `id` 合并。你设置中与仓库操作 id 相同的操作会取代它。启动项按名称合并。
|
||||
|
||||
等待标志在你设置了时取你的值,否则取仓库的值。
|
||||
|
||||
## 信任
|
||||
|
||||
仓库中的设置命令和操作会在你的机器上运行,而一次 `git pull` 就可能改变它们。因此,当其中某一条第一次即将运行时,OpenChamber 会显示完整的命令并询问你。**Trust and run** 会在此实例上记住你的回答。**Not this time** 只运行你自己的命令。
|
||||
|
||||
回答与命令本身绑定。当 pull 改变了仓库中的命令,会针对新内容再次询问。你可以在项目设置的 Worktree 区域用 **reset trust** 忘记回答。
|
||||
|
||||
把你自己的命令移到仓库视为信任它,因为你刚刚看过它。
|
||||
|
||||
## 仓库中的计划
|
||||
|
||||
“计划”标签中的计划也可以作为 Markdown 文件放在仓库里。默认文件夹是 `.openchamber/plans`。如果团队已经把计划放在例如 `docs/plans` 中,可在项目设置里的 **Plans folder** 指定仓库内的另一个文件夹。自定义文件夹会完全替代默认值:OpenChamber 只读写该文件夹,所以更改时请自行移动现有文件。
|
||||
|
||||
该文件夹中的每个 `.md` 文件都会显示在“计划”标签中,包括其他工具写的文件。在 OpenChamber 中编辑会按你输入的内容原样保存文件。移到仓库的计划保持其身份,之前附加了它的会话仍能找到它。
|
||||
|
||||
## 相关内容
|
||||
|
||||
- [项目操作](/project-actions/)
|
||||
- [工作树](/worktrees/)
|
||||
- [项目笔记、待办与计划](/notes-todos-plans/)
|
||||
@@ -224,6 +224,22 @@
|
||||
"tr": "Proje işlemleri"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "Repository config",
|
||||
"link": "/repository-config/",
|
||||
"translations": {
|
||||
"uk": "Конфіг у репозиторії",
|
||||
"zh-CN": "仓库配置",
|
||||
"es": "Configuración en el repositorio",
|
||||
"pt-BR": "Configuração no repositório",
|
||||
"ko": "저장소 설정",
|
||||
"pl": "Konfiguracja w repozytorium",
|
||||
"fr": "Configuration du dépôt",
|
||||
"ja": "リポジトリ設定",
|
||||
"de": "Repository-Konfiguration",
|
||||
"tr": "Depo yapılandırması"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "Preview & Dev Servers",
|
||||
"link": "/preview/",
|
||||
|
||||
Reference in New Issue
Block a user