@celljs/ta-workspace 0.0.0-stage → 4.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,29 @@
1
- # Temporary Holding Version
1
+ # @celljs/ta-workspace
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A pi package that comes with Ta: the workspace of the conversation shown, in the workbench beside it in the web client of `ta serve`, as the tools of an IDE.
4
+
5
+ | View | What it does |
6
+ | --- | --- |
7
+ | Explorer | The files of the conversation's directory, with the file icons of VS Code, the colors and letters of git (folders take the change inside them, ignored files are dimmed) and indent guides; it follows the tab shown. A click opens a file as a preview tab (the next preview takes its place), a double click keeps it: Markdown, HTML, images, videos, sounds and PDFs as a preview, the rest in Monaco (`pi.ui.CodeEditor`), saved with Ctrl+S or Cmd+S. New file and folder (`a/b.ts` makes the folders), rename and delete in place, with the checks of VS Code on names; a context menu with copy path and find in folder; the keys of a tree (arrows, Home/End, F2 or Enter on a Mac, Delete) |
8
+ | Open files | The tabs of files and changes this package opened, the one shown marked; close, close others, close below, reveal in the explorer |
9
+ | Search | Text in the files (ripgrep, git grep or grep, whichever the machine has): match case, whole word, a regular expression (its error shown), files to include and to exclude (globs separated by commas, a folder takes all inside it); each match of a line is a result, which opens the file selected on it. Replace one, in a file or all (with `$1` for a group), the change shown on each result; dismiss results (a file or a folder); collapse and expand all; the results as a list or a tree of folders |
10
+ | Source control | The branch with what it is ahead and behind, a box for the commit message (Ctrl+Enter or Cmd+Enter; with nothing staged it offers to stage all), merge changes, staged changes and changes, as a list or a tree; stage, unstage and discard a file or a group (discarding asks; for an untracked file it deletes), pull, push and fetch. A change opens in Monaco's diff editor, side by side or inline, the unchanged lines folded; a change not staged can be edited there and saved |
11
+ | Terminal | Shells on the machine of the session, in one tab; the first opens with it; they survive a dropped connection for 30 s |
12
+ | Browser | A page in its tab, such as the dev server the agent started: back, forward, reload and the address in one bar, a line while the page loads; a start page with the addresses opened lately (remove one with its ×), or the ports dev servers take when there are none yet. A page of the origin of Ta itself runs without `allow-same-origin`, so it cannot reach the page or its token |
13
+
14
+ Each view is a `panel` view of its web extension, opened from the `+` of the workbench or its empty state (`pi.web` of `package.json`); the work runs on the server through `pi.workspace` (`listDirectory`, `readFile`, `writeFile`, `fileUrl`, `runCommand`, …) and `pi.terminals`, in the execution environment of the directory, so a remote `ta exec-server` works the same. Search, source control and the changes to files are this package's: it runs `rg` (or `git grep`, or `grep`), `git`, `mkdir`, `mv -n` and `rm` with `runCommand` and reads their output; paths go to git as `:(literal)` pathspecs. Paths may not leave the directory. What the agent changes with its tools shows at once.
15
+
16
+ Files open in Monaco, which the page brings (`pi.ui.CodeEditor`, bundled with Ta, no network); Markdown, HTML, SVG open as a preview first, with Edit beside Preview. Previews load the file from `TaWorkspaceServer.fileUrl`: a page runs sandboxed in an origin of its own, Markdown (rendered with marked, bundled in) runs no scripts, and both load the files beside them with relative URLs. Diffs open in Monaco's diff editor (`pi.ui.DiffEditor`), terminals are drawn by a small ANSI screen (colors, the cursor, erasing). The file icons are the Seti icons VS Code shows by default (font and map from `extensions/theme-seti` of microsoft/vscode, MIT; `bun scripts/seti.ts` writes them again into `web-src/util/seti*.ts`). With `script` on the server a shell gets a pseudo-terminal; without it, it runs on pipes and the server echoes and edits the line.
17
+
18
+ Links of replies open here (`pi.registerOpener`): a file as its tab, with the lines the link names selected (`src/a.ts#L10-L20`, `src/a.ts:10:5`), even a file open with changes, which keeps them; a directory in the explorer, which switches to it; a page in the browser. Cmd or Ctrl + click opens a page in the browser of the system instead, which Ta does itself.
19
+
20
+ Turn it off in Settings → Packages.
21
+
22
+ ## Development
23
+
24
+ ```sh
25
+ bun run build # tsc -b, then bun build web-src/index.tsx → web/index.js (one module, no imports)
26
+ bun run test
27
+ ```
28
+
29
+ The web extension gets React from the page (`web-src/react.ts`) and icons from `pi.ui.icons`: it imports nothing at run time. To try it with an installed Ta, link the package into `~/.ta/agent/extensions/`.
package/package.json CHANGED
@@ -1,6 +1,41 @@
1
1
  {
2
2
  "name": "@celljs/ta-workspace",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "4.6.1",
4
+ "description": "A pi package for Ta: the workspace beside the conversation, with an explorer, open files, search, source control, terminals and a browser",
5
+ "keywords": [
6
+ "pi-package"
7
+ ],
8
+ "homepage": "https://github.com/cellbang/cell",
9
+ "bugs": {
10
+ "url": "https://github.com/cellbang/cell/issues"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://github.com/cellbang/cell.git"
15
+ },
16
+ "license": "MIT",
17
+ "files": [
18
+ "web",
19
+ "web-src"
20
+ ],
21
+ "scripts": {
22
+ "build": "tsc -b && bun build web-src/index.tsx --format esm --target browser --outfile web/index.js",
23
+ "clean": "rm -rf lib web *.tsbuildinfo",
24
+ "test": "bun test ./lib",
25
+ "watch": "tsc -b -w --preserveWatchOutput"
26
+ },
27
+ "devDependencies": {
28
+ "@celljs/ta-protocol": "4.6.1",
29
+ "@celljs/ta-web": "4.6.1",
30
+ "@types/react": "^19.3.0",
31
+ "marked": "^14.0.0"
32
+ },
33
+ "publishConfig": {
34
+ "access": "public"
35
+ },
36
+ "pi": {
37
+ "web": [
38
+ "./web/index.js"
39
+ ]
40
+ }
41
+ }