Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
// Install Node.js.
"ghcr.io/devcontainers/features/node:latest": {},
// Add the GitHub CLI as a feature (to support the CodeChat Editor).
"ghcr.io/devcontainers/features/github-cli:1": {}
"ghcr.io/devcontainers/features/github-cli:1": {},
// Include Chrome for browser testing. Note: this installs the binary
// as `/usr/local/bin/chrome`; postCreateCommand.sh symlinks it to
// `google-chrome` so Selenium Manager can find it.
"ghcr.io/kreemer/features/chrometesting:1": {}
},
// Run this script after the container is created.
"postCreateCommand": "./.devcontainer/postCreateCommand.sh",
Expand Down
8 changes: 8 additions & 0 deletions .devcontainer/postCreateCommand.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#!/usr/bin/env bash

# The chrometesting feature installs the Chrome binary as
# `/usr/local/bin/chrome`, but `thirtyfour`'s webdriver manager (Selenium
# Manager) only looks for binaries named `google-chrome`, `chromium-browser`,
# or `chromium` on Linux. Symlink it so the browser can be found.
if [ -x /usr/local/bin/chrome ] && [ ! -e /usr/local/bin/google-chrome ]; then
sudo ln -s /usr/local/bin/chrome /usr/local/bin/google-chrome
fi

cd server
./bt install --dev
./bt build
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,24 @@ Changelog

* No changes.

Version 0.1.58 -- 2026-Jun-26
Version 0.1.60 -- 2026-Jul-07
-----------------------------

* Fix [#113](https://github.com/bjones1/CodeChat_Editor/issues/113) -- when
selecting a doc block in the IDE that contains a line wider than the Client's
view, the Client scrolled the horizontal scrollbar all the way to the end of
the line. This fix only performs vertical scrolling, but leaves the horizontal
scroll unchanged.
* Fix keyboard navigation -- moving between doc blocks and code blocks with
arrow keys is now supported.
* Fix regression -- `id` attributes on HTML elements are no longer blocked.
* Fix unexpected scrolling when editing doc blocks which exceed the screen
height.
* Update the delimiter when a doc block is updated.
* Remove highlight around the a doc block when it's being edited, which hides
the cursor when the cursor is at the beginning of the line.

Version 0.1.59 -- 2026-Jun-26
-----------------------------

* Block malicious HTML in source code/Markdown documents.
Expand Down
46 changes: 46 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
Instructions for Claude Code
============================

Code blocks and doc blocks
--------------------------

The CodeChat Editor divides source code into code blocks and documentation (doc)
blocks. These blocks are separated by newlines. A code block consists of all
lines in a source file which aren't classified as a doc block. Note that code
blocks may consist entirely of a comment, as illustrated below.

A doc block consists of a comment (inline or block) optionally preceded by
whitespace and optionally succeeded by whitespace. At least one whitespace
character must separate the opening comment delimiter from the doc block text.
Doc blocks are differentiated by their indent: the whitespace characters
preceding the opening comment delimiter. Adjacent doc blocks with identical
indents are combined into a single, larger doc block.

```c
// This is all one doc block, since only the preceding
// whitespace (there is none) matters, not the amount of
// whitespace following the opening comment delimiters.
// This is the beginning of a different doc
// block, since the indent is different.
// Here's a third doc block; inline and block comments
/* combine as long as the whitespace preceding the comment
delimiters is identical. Whitespace inside the comment doesn't affect
the classification. */
// These are two separate doc blocks,
void foo();
// since they are separated by a code block.
```

Architecture
------------

A Visual Studio Code extension in `extensions/VSCode` exchanges messages with the CodeChat Editor Server, located in `server/` (also terms the Server), which also exchanges message with the CodeChat Editor Client (also termed the Client) located in `client/`.

Project build
-------------

All build commands must be executed from the `server/` directory.

* To build the entire project, execute `./bt build`.
* To build (bundle) only the Client, execute `./bt client-build`.
* To run tests, execute `cargo test`.
28 changes: 10 additions & 18 deletions builder/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions builder/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ fn run_install(dev: bool) -> io::Result<()> {
cargo fetch --manifest-path=$BUILDER_PATH/Cargo.toml;
info "VSCode extension: cargo fetch";
cargo fetch --manifest-path=$VSCODE_PATH/Cargo.toml;
info "test_utils: cargo fetch"
info "test_utils: cargo fetch";
cargo fetch --manifest-path=$TEST_UTILS_PATH/Cargo.toml;
info "cargo fetch";
cargo fetch;
Expand Down Expand Up @@ -437,7 +437,7 @@ fn run_update() -> io::Result<()> {
cargo update --manifest-path=$BUILDER_PATH/Cargo.toml;
info "VSCode extension: cargo update";
cargo update --manifest-path=$VSCODE_PATH/Cargo.toml;
info "test_utils: cargo update"
info "test_utils: cargo update";
cargo update --manifest-path=$TEST_UTILS_PATH/Cargo.toml;
info "cargo update";
cargo update;
Expand All @@ -450,7 +450,7 @@ fn run_update() -> io::Result<()> {
cargo outdated --manifest-path=$BUILDER_PATH/Cargo.toml;
info "VSCode extension: cargo outdated";
cargo outdated --manifest-path=$VSCODE_PATH/Cargo.toml;
info "test_utils: cargo outdated"
info "test_utils: cargo outdated";
cargo outdated --manifest-path=$TEST_UTILS_PATH/Cargo.toml;
info "cargo outdated";
cargo outdated;
Expand All @@ -476,7 +476,7 @@ fn run_format_and_lint(check_only: bool) -> io::Result<()> {
info "VSCode extension: cargo clippy and fmt";
cargo clippy --all-targets --all-features --manifest-path=$VSCODE_PATH/Cargo.toml -- $clippy_check_only;
cargo fmt --all $check --manifest-path=$VSCODE_PATH/Cargo.toml;
info "test_utils: cargo clippy and fmt"
info "test_utils: cargo clippy and fmt";
cargo clippy --all-targets --all-features --manifest-path=$TEST_UTILS_PATH/Cargo.toml -- $clippy_check_only;
cargo fmt --all $check --manifest-path=$TEST_UTILS_PATH/Cargo.toml;

Expand All @@ -486,7 +486,7 @@ fn run_format_and_lint(check_only: bool) -> io::Result<()> {
cargo audit --file=$BUILDER_PATH/Cargo.lock --no-fetch;
info "VSCode extension: cargo audit";
cargo audit --file=$VSCODE_PATH/Cargo.lock --no-fetch;
info "test_utils: cargo audit"
info "test_utils: cargo audit";
cargo audit --file=$TEST_UTILS_PATH/Cargo.lock --no-fetch;

info "cargo sort";
Expand All @@ -497,8 +497,8 @@ fn run_format_and_lint(check_only: bool) -> io::Result<()> {
cd $VSCODE_PATH;
info "VSCode extension: cargo sort";
cargo sort $check;
info "test_utils: cargo sort"
cd $TEST_UTILS_PATH;
info "test_utils: cargo sort";
cd ../$TEST_UTILS_PATH;
cargo sort $check;

)?;
Expand Down Expand Up @@ -526,7 +526,7 @@ fn run_test() -> io::Result<()> {
cargo test --manifest-path=$BUILDER_PATH/Cargo.toml;
info "VSCode extension: cargo test";
cargo test --manifest-path=$VSCODE_PATH/Cargo.toml;
info "test_utils: cargo test"
info "test_utils: cargo test";
cargo test --manifest-path=$TEST_UTILS_PATH/Cargo.toml;
info "cargo test";
cargo test;
Expand Down Expand Up @@ -613,7 +613,7 @@ fn run_client_build(
true,
)?;

// \<a id="#pdf.js>The PDF viewer for use with VSCode. Build it separately,
// <a id="#pdf.js"></a>The PDF viewer for use with VSCode. Build it separately,
// since it's loaded apart from the rest of the Client.
run_script(
&esbuild,
Expand Down
32 changes: 16 additions & 16 deletions client/package.json5
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
url: 'https://github.com/bjones1/CodeChat_editor',
},
type: 'module',
version: '0.1.59',
version: '0.1.60',
dependencies: {
'@codemirror/commands': '^6.10.4',
'@codemirror/lang-cpp': '^6.0.3',
Expand All @@ -62,40 +62,40 @@
'@codemirror/lang-yaml': '^6.1.3',
'@codemirror/language': '^6.12.4',
'@codemirror/legacy-modes': '^6.5.3',
'@codemirror/state': '^6.7.0',
'@codemirror/view': '^6.43.3',
'@hpcc-js/wasm-graphviz': '^1.22.2',
'@mathjax/mathjax-newcm-font': '^4.1.2',
'@codemirror/state': '^6.7.1',
'@codemirror/view': '^6.43.5',
'@hpcc-js/wasm-graphviz': '^1.24.1',
'@mathjax/mathjax-newcm-font': '^4.1.3',
codemirror: '^6.0.2',
mathjax: '^4.1.2',
mermaid: '^11.15.0',
'pdfjs-dist': '^6.0.227',
tinymce: '^8.6.0',
mathjax: '^4.1.3',
mermaid: '^11.16.0',
'pdfjs-dist': '^6.1.200',
tinymce: '^8.7.0',
'toastify-js': '^1.12.0',
},
devDependencies: {
'@eslint/css': '^1.3.0',
'@eslint/css': '^1.4.0',
'@eslint/js': '^10.0.1',
'@types/chai': '^5.2.3',
'@types/dom-navigation': '^1.0.7',
'@types/js-beautify': '^1.14.3',
'@types/mocha': '^10.0.10',
'@types/node': '^24.13.2',
'@types/toastify-js': '^1.12.4',
'@typescript-eslint/eslint-plugin': '^8.62.0',
'@typescript-eslint/parser': '^8.62.0',
'@typescript-eslint/eslint-plugin': '^8.62.1',
'@typescript-eslint/parser': '^8.62.1',
chai: '^6.2.2',
esbuild: '^0.28.1',
eslint: '^10.5.0',
eslint: '^10.6.0',
'eslint-config-prettier': '^10.1.8',
'eslint-plugin-import': '^2.32.0',
'eslint-plugin-prettier': '^5.5.6',
globals: '^17.7.0',
mocha: '^11.7.6',
'npm-check-updates': '^22.2.7',
prettier: '^3.8.4',
'npm-check-updates': '^22.2.9',
prettier: '^3.9.4',
typescript: '^6.0.3',
'typescript-eslint': '^8.62.0',
'typescript-eslint': '^8.62.1',
},
scripts: {
test: 'echo "Error: no test specified" && exit 1',
Expand Down
Loading
Loading