@oxide/skepsis 0.6.0 → 0.8.0

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
@@ -154,6 +154,14 @@ const end = Number(match[2])
154
154
  // </review>
155
155
  ```
156
156
 
157
+ Selecting text in the diff also opens the comment box, to comment on part of a
158
+ line rather than the whole thing. The box opens directly under the selection,
159
+ and the selected text stays highlighted while you write. Selecting whole lines
160
+ (a triple-click, say) is the same as commenting from the gutter. While the box
161
+ is empty, clicking elsewhere in the code closes it, and ⌘C copies the selected
162
+ text. The open tag quotes the selection, eliding the middle if it's long:
163
+ `<review on="Number(match[1])">`.
164
+
157
165
  ### Marking files viewed
158
166
 
159
167
  Viewed state is stored per file in `~/.local/share/skepsis/` using the file's
@@ -169,7 +177,9 @@ agent, a tmux pane, or a log. There is not chat UI in skepsis (yet) so replies
169
177
  from the agent will appear in that session, wherever it is. Send works
170
178
  in some cases that inline comments can't (because there is no file to write): on
171
179
  removed lines, and on diffs that don't end at the working copy. The **Comment**
172
- button continues to write a `<review>` marker in the file as usual.
180
+ button continues to write a `<review>` marker in the file as usual. When you
181
+ send a comment on selected text, the message includes where the selection
182
+ starts and ends.
173
183
 
174
184
  The only way to set the command is `--send` or `SKEPSIS_SEND`. skepsis never
175
185
  reads it from the repo contents, so reviewing someone else's branch
@@ -212,6 +222,7 @@ The JSON sent to stdin looks like this:
212
222
  "file": "src/a.ts",
213
223
  "side": "additions",
214
224
  "lines": [42, 45],
225
+ "columns": null,
215
226
  "code": [{ "lines": [41, 46], "text": "const z = 0\nconst a = 1\n…" }],
216
227
  "blob": "9daeafb",
217
228
  "text": "why two?",
@@ -220,7 +231,10 @@ The JSON sent to stdin looks like this:
220
231
  ````
221
232
 
222
233
  `side` is `additions` or `deletions`, and `lines` (1-based, inclusive) are in
223
- that side's numbering. `code` is an excerpt of that side around the lines
234
+ that side's numbering. `columns` is set when the comment is on selected text
235
+ rather than whole lines: where the text starts in the first line and ends
236
+ (exclusive) in the last, 0-based, in UTF-16 code units. The prompt then marks
237
+ the text in the excerpt with `⟦` and `⟧`. `code` is an excerpt of that side around the lines
224
238
  commented on, in runs of consecutive lines, each with its own first and last
225
239
  line. There's more than one run when the lines commented on span lines the
226
240
  diff doesn't show. `blob` is the ID of the