kon-coding-agent 0.3.6__tar.gz → 0.3.7__tar.gz
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.
- kon_coding_agent-0.3.7/.kon/skills/kon-tmux-test/SKILL.md +250 -0
- kon_coding_agent-0.3.7/.kon/skills/kon-tmux-test/run-e2e-tests.sh +312 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/CHANGELOG.md +55 -0
- kon_coding_agent-0.3.6/README.md → kon_coding_agent-0.3.7/PKG-INFO +82 -1
- kon_coding_agent-0.3.6/PKG-INFO → kon_coding_agent-0.3.7/README.md +62 -21
- kon_coding_agent-0.3.7/docs/e2e-test-coverage-review.md +216 -0
- kon_coding_agent-0.3.7/micro +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/pyproject.toml +2 -2
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/scripts/show_themes.py +12 -2
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/config.py +38 -9
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/defaults/config.toml +4 -2
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/llm/base.py +1 -1
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/llm/models.py +18 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/llm/providers/copilot.py +1 -1
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/llm/providers/openai_codex_responses.py +1 -1
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/llm/providers/openai_responses.py +1 -1
- kon_coding_agent-0.3.7/src/kon/notify.py +96 -0
- kon_coding_agent-0.3.7/src/kon/runtime.py +469 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/session.py +2 -2
- kon_coding_agent-0.3.7/src/kon/sounds/completion.wav +0 -0
- kon_coding_agent-0.3.7/src/kon/sounds/error.wav +0 -0
- kon_coding_agent-0.3.7/src/kon/sounds/permission.wav +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/themes.py +310 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/tools/bash.py +24 -10
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/tools/edit.py +2 -1
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/ui/app.py +293 -235
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/ui/autocomplete.py +3 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/ui/blocks.py +61 -22
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/ui/chat.py +111 -31
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/ui/commands.py +237 -238
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/ui/floating_list.py +0 -8
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/ui/formatting.py +3 -2
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/ui/input.py +14 -1
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/ui/selection_mode.py +3 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/ui/session_ui.py +14 -74
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/ui/styles.py +10 -1
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/ui/widgets.py +52 -42
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/test_cli_provider_resolution.py +5 -5
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/test_compaction.py +19 -1
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/test_config_migration.py +70 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/test_handoff.py +23 -2
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/test_notifications_config.py +3 -0
- kon_coding_agent-0.3.7/tests/test_notify.py +138 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/test_session_resume.py +20 -5
- kon_coding_agent-0.3.7/tests/test_themes.py +38 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/test_ui_notifications.py +11 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/tools/test_edit_display.py +12 -0
- kon_coding_agent-0.3.7/tests/ui/test_app_approval_keys.py +91 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/ui/test_autocomplete.py +3 -0
- kon_coding_agent-0.3.7/tests/ui/test_info_bar_clicks.py +22 -0
- kon_coding_agent-0.3.7/tests/ui/test_info_bar_permissions.py +51 -0
- kon_coding_agent-0.3.7/tests/ui/test_input_shell_style.py +71 -0
- kon_coding_agent-0.3.7/tests/ui/test_keybindings.py +18 -0
- kon_coding_agent-0.3.7/tests/ui/test_permission_selection_status.py +53 -0
- kon_coding_agent-0.3.7/tests/ui/test_permissions_command.py +130 -0
- kon_coding_agent-0.3.7/tests/ui/test_shell_command_detection.py +191 -0
- kon_coding_agent-0.3.7/tests/ui/test_status_line.py +46 -0
- kon_coding_agent-0.3.7/tests/ui/test_thinking_notifications_commands.py +185 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/uv.lock +9 -9
- kon_coding_agent-0.3.6/.kon/skills/kon-tmux-test/SKILL.md +0 -208
- kon_coding_agent-0.3.6/.kon/skills/kon-tmux-test/run-e2e-tests.sh +0 -223
- kon_coding_agent-0.3.6/src/kon/notify.py +0 -30
- kon_coding_agent-0.3.6/tests/test_notify.py +0 -46
- kon_coding_agent-0.3.6/tests/ui/test_status_line.py +0 -12
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/.github/workflows/test.yml +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/.gitignore +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/.kon/skills/kon-release-publish/SKILL.md +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/.kon/skills/kon-tmux-test/setup-test-project.sh +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/.python-version +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/AGENTS.md +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/LICENSE +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/docs/architecture-review.md +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/docs/code-health-scan.md +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/docs/images/kon-screenshot.png +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/docs/local-models.md +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/__init__.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/async_utils.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/builtin_skills/init/SKILL.md +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/context/__init__.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/context/_xml.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/context/agent_mds.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/context/git.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/context/loader.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/context/skills.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/core/__init__.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/core/compaction.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/core/handoff.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/core/types.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/defaults/__init__.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/events.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/llm/__init__.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/llm/oauth/__init__.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/llm/oauth/copilot.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/llm/oauth/openai.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/llm/providers/__init__.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/llm/providers/anthropic.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/llm/providers/azure_ai_foundry.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/llm/providers/copilot_anthropic.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/llm/providers/github_copilot_headers.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/llm/providers/mock.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/llm/providers/openai_compat.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/llm/providers/openai_completions.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/llm/providers/sanitize.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/loop.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/permissions.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/py.typed +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/tools/__init__.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/tools/_read_image.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/tools/_tool_utils.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/tools/base.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/tools/find.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/tools/grep.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/tools/read.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/tools/web_fetch.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/tools/web_search.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/tools/write.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/tools_manager.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/turn.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/ui/__init__.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/ui/app_protocol.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/ui/clipboard.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/ui/export.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/ui/latex.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/ui/path_complete.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/ui/prompt_history.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/ui/welcome.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/src/kon/update_check.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/conftest.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/context/test_agents.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/context/test_skills.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/llm/__init__.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/llm/test_anthropic_provider.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/llm/test_azure_ai_foundry_provider.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/llm/test_mock_provider.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/llm/test_openai_codex_provider_errors.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/llm/test_openai_oauth.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/test_agentic_loop.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/test_cli_auth_flags.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/test_config_binaries.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/test_config_error_fallback.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/test_config_injection.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/test_handoff_link_interrupt.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/test_launch_warnings.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/test_local_auth_config.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/test_model_provider_resolution.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/test_openai_compat.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/test_permissions.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/test_session_persistence.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/test_session_queries.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/test_system_prompt.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/test_system_prompt_git_context.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/test_tools_manager.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/test_update_check.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/test_update_notice_behavior.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/tools/test_diff.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/tools/test_edit.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/tools/test_read.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/tools/test_read_image.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/tools/test_read_image_integration.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/tools/test_subprocess_cancellation.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/tools/test_write.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/ui/test_floating_list.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/ui/test_input_handoff.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/ui/test_input_paste.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/ui/test_latex.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/ui/test_prompt_history.py +0 -0
- {kon_coding_agent-0.3.6 → kon_coding_agent-0.3.7}/tests/ui/test_styles.py +0 -0
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kon-tmux-test
|
|
3
|
+
description: E2E testing of kon using tmux sessions; IMPORTANT: only trigger this skill when user asks for e2e testing of kon
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Kon Tmux E2E Testing
|
|
7
|
+
|
|
8
|
+
End-to-end testing of kon using tmux sessions to programmatically control the TUI application.
|
|
9
|
+
|
|
10
|
+
## Why Tmux?
|
|
11
|
+
|
|
12
|
+
Kon is a TUI (Textual-based) app. Running tests programmatically is hard. Tmux provides:
|
|
13
|
+
|
|
14
|
+
- `tmux new-session` - isolate test environment
|
|
15
|
+
- `tmux send-keys` - send keyboard input
|
|
16
|
+
- `tmux capture-pane` - capture output
|
|
17
|
+
- `tmux has-session` - check if kon is running
|
|
18
|
+
|
|
19
|
+
## Test Design Philosophy
|
|
20
|
+
|
|
21
|
+
- **Deterministic**: Shell scripts create reproducible test environments
|
|
22
|
+
- **Isolated config**: Tests run with `HOME=/tmp/kon-e2e-home` so runtime settings do not mutate the real user config; auth JSON files are copied into the temp HOME when present so provider startup still works
|
|
23
|
+
- **Separation of concerns**: Shell script runs steps and captures output; kon/the reviewer evaluates results
|
|
24
|
+
- **Output-based evaluation**: Test success/failure determined by reading output files, not shell script heuristics
|
|
25
|
+
- **UI-focused**: Test triggers (`@`, `/`, runtime pickers, keybindings) by checking UI elements appear
|
|
26
|
+
- **Filesystem verification**: Tool execution is verified through files under `/tmp/kon-test-project`
|
|
27
|
+
|
|
28
|
+
## Quick Start
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Run all e2e tests from the repo root
|
|
32
|
+
bash .kon/skills/kon-tmux-test/run-e2e-tests.sh
|
|
33
|
+
|
|
34
|
+
# Optional: keep the temporary HOME for debugging
|
|
35
|
+
KEEP_E2E_HOME=1 bash .kon/skills/kon-tmux-test/run-e2e-tests.sh
|
|
36
|
+
|
|
37
|
+
# Optional: override launch command/provider/model
|
|
38
|
+
KON_CMD='uv run kon --model gpt-5.5' \
|
|
39
|
+
bash .kon/skills/kon-tmux-test/run-e2e-tests.sh
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
After running, read `/tmp/kon-test-*.txt` and evaluate the captured pane/config/filesystem outputs.
|
|
43
|
+
|
|
44
|
+
## Test Scripts
|
|
45
|
+
|
|
46
|
+
### Setup Script: `setup-test-project.sh`
|
|
47
|
+
|
|
48
|
+
Creates a deterministic test project structure at `/tmp/kon-test-project/`.
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
bash .kon/skills/kon-tmux-test/setup-test-project.sh
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Main Test Script: `run-e2e-tests.sh`
|
|
55
|
+
|
|
56
|
+
Runs comprehensive e2e tests including UI triggers, runtime controls, tab completion, and tool execution.
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
bash .kon/skills/kon-tmux-test/run-e2e-tests.sh
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Test Categories
|
|
63
|
+
|
|
64
|
+
### UI Trigger Tests (LLM-independent)
|
|
65
|
+
|
|
66
|
+
- **/ commands**: Type `/`, verify slash command list appears with core and newer commands
|
|
67
|
+
- **@ file search**: Type `@pyproject`, verify file picker appears with `pyproject.toml`
|
|
68
|
+
- **/model command**: Type `/model`, verify model selector appears, then dismiss
|
|
69
|
+
- **/new command**: Type `/new`, verify new conversation is started
|
|
70
|
+
- **/resume command**: Type `/resume`, verify session list appears, then dismiss
|
|
71
|
+
- **/session command**: Type `/session`, verify session info/statistics displayed
|
|
72
|
+
|
|
73
|
+
### Runtime Mode Tests (LLM-independent)
|
|
74
|
+
|
|
75
|
+
- **/permissions picker**: Shows `prompt` and `auto`, with current mode checked
|
|
76
|
+
- **/permissions auto/prompt**: Info bar updates (`✓✓ auto` / `⏸ prompt`) and temp config persists `permissions.mode`
|
|
77
|
+
- **Shift+Tab**: Cycles permission mode and persists it in temp config
|
|
78
|
+
- **/thinking picker**: Shows `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, with current level checked
|
|
79
|
+
- **/thinking minimal**: Info bar model/thinking area updates to `minimal`
|
|
80
|
+
- **Ctrl+Shift+T**: Cycles thinking level in the info bar
|
|
81
|
+
- **/notifications picker**: Shows `on` and `off`, with current mode checked
|
|
82
|
+
- **/notifications on/off**: Status says saved and temp config persists `notifications.enabled`
|
|
83
|
+
- **Info bar row2 regression**: Permission mode remains row2-left while model/provider/thinking remains row2-right after runtime changes
|
|
84
|
+
|
|
85
|
+
### Tab Path Completion Tests (LLM-independent)
|
|
86
|
+
|
|
87
|
+
- **Unique match**: Type `pypr` + Tab, verify completes to `pyproject.toml`
|
|
88
|
+
- **Multiple alternatives**: Type `src/kon/ui/s` + Tab, verify floating list shows `selection_mode.py`, `session_ui.py`, `styles.py`
|
|
89
|
+
- **Nested unique file**: Type `src/kon/ui/widg` + Tab, verify completes to `src/kon/ui/widgets.py`
|
|
90
|
+
- **Select from list**: Type `src/kon/ui/s` + Tab + Enter, verify first completion is applied to input
|
|
91
|
+
|
|
92
|
+
### Tool Execution Tests (Filesystem verification)
|
|
93
|
+
|
|
94
|
+
- **Write tool**: Creates `/tmp/kon-test-project/test1.txt`, verified by file existence
|
|
95
|
+
- **Edit tool**: Modifies `test1.txt`, verified by content changing from `hello` to `world`
|
|
96
|
+
- **List files**: Shows directory contents in captured pane
|
|
97
|
+
- **Calculation**: Computes `3+3`, verified in LLM output where practical
|
|
98
|
+
|
|
99
|
+
## Configuration
|
|
100
|
+
|
|
101
|
+
Edit or override environment variables for `run-e2e-tests.sh`:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
WAIT_TIME=30 # Time for LLM to complete all tool tasks
|
|
105
|
+
COMMAND_WAIT_TIME=3 # Time for UI commands to settle
|
|
106
|
+
SESSION_NAME="kon-test" # Tmux session name
|
|
107
|
+
TEST_DIR="/tmp/kon-test-project" # Test project directory for tool execution
|
|
108
|
+
TEST_HOME="/tmp/kon-e2e-home" # Isolated HOME/config/session directory
|
|
109
|
+
KON_DIR="$PWD" # Kon repo directory for tab completion tests
|
|
110
|
+
KON_CMD="uv run kon --model gpt-5.5"
|
|
111
|
+
KEEP_E2E_HOME=0 # Set to 1 to preserve temp HOME after run
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Output Files
|
|
115
|
+
|
|
116
|
+
The main script writes captured outputs to `/tmp/kon-test-*.txt`:
|
|
117
|
+
|
|
118
|
+
- `/tmp/kon-test-1-commands.txt` - `/` slash command list
|
|
119
|
+
- `/tmp/kon-test-2-at-trigger.txt` - `@pyproject` file picker
|
|
120
|
+
- `/tmp/kon-test-3-model.txt` - `/model` selector
|
|
121
|
+
- `/tmp/kon-test-4-new.txt` - `/new` result
|
|
122
|
+
- `/tmp/kon-test-5-permissions-picker.txt` - `/permissions` picker
|
|
123
|
+
- `/tmp/kon-test-6-permissions-auto.txt` and `...-config.txt` - `/permissions auto`
|
|
124
|
+
- `/tmp/kon-test-7-permissions-prompt.txt` and `...-config.txt` - `/permissions prompt`
|
|
125
|
+
- `/tmp/kon-test-8-permissions-shift-tab.txt` and `...-config.txt` - Shift+Tab mode cycling
|
|
126
|
+
- `/tmp/kon-test-9-thinking-picker.txt` - `/thinking` picker
|
|
127
|
+
- `/tmp/kon-test-10-thinking-minimal.txt` - `/thinking minimal`
|
|
128
|
+
- `/tmp/kon-test-11-thinking-cycle.txt` - Ctrl+Shift+T thinking cycle
|
|
129
|
+
- `/tmp/kon-test-12-notifications-picker.txt` - `/notifications` picker
|
|
130
|
+
- `/tmp/kon-test-13-notifications-on.txt` and `...-config.txt` - `/notifications on`
|
|
131
|
+
- `/tmp/kon-test-14-notifications-off.txt` and `...-config.txt` - `/notifications off`
|
|
132
|
+
- `/tmp/kon-test-15-tab-unique.txt` - Tab completion unique match
|
|
133
|
+
- `/tmp/kon-test-16-tab-multiple.txt` - Tab completion alternatives
|
|
134
|
+
- `/tmp/kon-test-17-tab-nested-unique.txt` - Nested unique file completion
|
|
135
|
+
- `/tmp/kon-test-18-tab-select.txt` - Tab completion selection
|
|
136
|
+
- `/tmp/kon-test-19-tools.txt` - Tool execution turn
|
|
137
|
+
- `/tmp/kon-test-20-session.txt` - `/session` stats
|
|
138
|
+
- `/tmp/kon-test-21-resume.txt` - `/resume` session list
|
|
139
|
+
- `/tmp/kon-test-files.txt` - Test project file listing
|
|
140
|
+
- `/tmp/kon-test-test1-content.txt` - Final `test1.txt` content or `FILE_NOT_FOUND`
|
|
141
|
+
- `/tmp/kon-test-session-files.txt` - Session JSONL paths under temp HOME
|
|
142
|
+
- `/tmp/kon-test-final-config.txt` - Final temp config
|
|
143
|
+
|
|
144
|
+
## Key Tmux Gotchas
|
|
145
|
+
|
|
146
|
+
- **Use `Escape` not `Esc`**: tmux recognizes `Escape`. `Esc` sends literal characters.
|
|
147
|
+
- **Always clear input between tests**: Use `Escape` to dismiss completions, then `C-u` to clear text.
|
|
148
|
+
- **Completion selectors block input**: Selectors intercept Enter/Escape; dismiss them before the next test.
|
|
149
|
+
- **Shift+Tab**: The script sends CSI Z via `Escape '[' 'Z'` rather than relying on a tmux key name.
|
|
150
|
+
- **Ctrl+Shift+T**: The script sends CSI-u `Escape '[84;6u'` because `C-S-t` often collapses to Ctrl+T.
|
|
151
|
+
|
|
152
|
+
## Test Evaluation (by Kon/reviewer)
|
|
153
|
+
|
|
154
|
+
After running the test script, evaluate results by reading the output files.
|
|
155
|
+
|
|
156
|
+
### What to Check
|
|
157
|
+
|
|
158
|
+
**UI Trigger Tests:**
|
|
159
|
+
|
|
160
|
+
- `/` test: Slash command list includes `themes`, `permissions`, `thinking`, `notifications`, `init`, `compact`, `handoff`, `export`, `copy`, `login`, `logout`
|
|
161
|
+
- `@` test: File picker appears and shows `pyproject.toml`
|
|
162
|
+
- `/model` test: Model selector appears with model list/current markers
|
|
163
|
+
- `/new` test: `Started new conversation` appears
|
|
164
|
+
- `/resume` test: Session list appears with prior sessions
|
|
165
|
+
- `/session` test: Session info/statistics displayed
|
|
166
|
+
|
|
167
|
+
**Runtime Mode Tests:**
|
|
168
|
+
|
|
169
|
+
- `/permissions` picker shows `prompt` and `auto`, current item checked
|
|
170
|
+
- `/permissions auto` shows `✓✓ auto`, saved status, and config has `mode = "auto"`
|
|
171
|
+
- `/permissions prompt` shows `⏸ prompt`, saved status, and config has `mode = "prompt"`
|
|
172
|
+
- Shift+Tab toggles back to `auto` and config has `mode = "auto"`
|
|
173
|
+
- `/thinking` picker shows `none`, `minimal`, `low`, `medium`, `high`, `xhigh`
|
|
174
|
+
- `/thinking minimal` shows `Thinking level changed to minimal` and info bar row2-right includes `minimal`
|
|
175
|
+
- Ctrl+Shift+T changes info bar thinking level from `minimal` to the next level
|
|
176
|
+
- `/notifications` picker shows `on` and `off`, current item checked
|
|
177
|
+
- `/notifications on/off` status says saved and config flips `enabled = true/false`
|
|
178
|
+
- Permission mode remains in row2-left and model/provider/thinking remains row2-right
|
|
179
|
+
|
|
180
|
+
**Tab Path Completion Tests:**
|
|
181
|
+
|
|
182
|
+
- `pypr` + Tab shows `pyproject.toml`
|
|
183
|
+
- `src/kon/ui/s` + Tab shows `selection_mode.py`, `session_ui.py`, `styles.py`
|
|
184
|
+
- `src/kon/ui/widg` + Tab shows `src/kon/ui/widgets.py`
|
|
185
|
+
- `src/kon/ui/s` + Tab + Enter applies a selected completion
|
|
186
|
+
|
|
187
|
+
**Tool Execution Tests:**
|
|
188
|
+
|
|
189
|
+
- `/tmp/kon-test-project/test1.txt` exists
|
|
190
|
+
- `/tmp/kon-test-test1-content.txt` contains `world`
|
|
191
|
+
- `/tmp/kon-test-files.txt` lists `test1.txt`
|
|
192
|
+
- `/tmp/kon-test-19-tools.txt` shows relevant tool blocks/results
|
|
193
|
+
|
|
194
|
+
### Tabular Report
|
|
195
|
+
|
|
196
|
+
Provide a summary showing:
|
|
197
|
+
|
|
198
|
+
- Test name
|
|
199
|
+
- Status (PASS/FAIL)
|
|
200
|
+
- Description/failure reason
|
|
201
|
+
- Overall success rate
|
|
202
|
+
|
|
203
|
+
### IMPORTANT: Always offer the view command
|
|
204
|
+
|
|
205
|
+
After presenting the report, ALWAYS give the user this shell command so they can inspect raw captured outputs:
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
for f in /tmp/kon-test-*.txt; do printf "\n\033[1;36m▶▶▶ %s\033[0m\n" "$f"; awk 'NF{found=1} found{lines[++n]=$0} END{while(n>0 && lines[n]=="") n--; for(i=1;i<=n;i++) print lines[i]}' "$f"; done
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
## Cleanup
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
# Test script auto-cleans tmux session and temp HOME unless KEEP_E2E_HOME=1.
|
|
215
|
+
# Output files remain for evaluation (/tmp/kon-test-*.txt).
|
|
216
|
+
# Manual cleanup if needed:
|
|
217
|
+
tmux kill-session -t kon-test 2>/dev/null
|
|
218
|
+
rm -rf /tmp/kon-test-project /tmp/kon-e2e-home
|
|
219
|
+
rm -f /tmp/kon-test-*.txt
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## Tmux Commands Reference
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
# Session management
|
|
226
|
+
tmux new-session -d -s <name> -c <dir> '<command>'
|
|
227
|
+
tmux kill-session -t <name>
|
|
228
|
+
tmux has-session -t <name>
|
|
229
|
+
|
|
230
|
+
# Input — IMPORTANT: use full key names (Escape, Enter, not Esc)
|
|
231
|
+
tmux send-keys -t <name> "text"
|
|
232
|
+
tmux send-keys -t <name> Enter
|
|
233
|
+
tmux send-keys -t <name> Escape
|
|
234
|
+
tmux send-keys -t <name> Tab
|
|
235
|
+
tmux send-keys -t <name> C-c
|
|
236
|
+
tmux send-keys -t <name> C-u
|
|
237
|
+
|
|
238
|
+
# Output
|
|
239
|
+
tmux capture-pane -t <name> -p
|
|
240
|
+
tmux capture-pane -t <name> -p > file.txt
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
## Tips
|
|
244
|
+
|
|
245
|
+
- Tests are deterministic: project/config structure is recreated each run.
|
|
246
|
+
- Runtime mode tests are LLM-independent and should be checked first.
|
|
247
|
+
- Tab completion tests run from the kon repo to use known paths.
|
|
248
|
+
- Tool tests verify filesystem state; avoid relying solely on LLM prose.
|
|
249
|
+
- Use `KEEP_E2E_HOME=1` to inspect temp config/session files after failures.
|
|
250
|
+
- Run tool execution before `/resume` so there is a session with messages in the list.
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Comprehensive e2e test script for kon
|
|
4
|
+
# Tests UI triggers (@, / commands, runtime mode controls, Tab completion) and tool execution.
|
|
5
|
+
# This script runs steps and captures output — evaluation is done by kon reading the output files.
|
|
6
|
+
|
|
7
|
+
set -u
|
|
8
|
+
|
|
9
|
+
# Configuration
|
|
10
|
+
WAIT_TIME=${WAIT_TIME:-30} # Time for LLM to complete tool tasks
|
|
11
|
+
COMMAND_WAIT_TIME=${COMMAND_WAIT_TIME:-3} # Time for UI commands to settle
|
|
12
|
+
SESSION_NAME=${SESSION_NAME:-"kon-test"}
|
|
13
|
+
TEST_DIR=${TEST_DIR:-"/tmp/kon-test-project"}
|
|
14
|
+
TEST_HOME=${TEST_HOME:-"/tmp/kon-e2e-home"}
|
|
15
|
+
KON_DIR=${KON_DIR:-"$PWD"} # use caller's current working directory
|
|
16
|
+
KON_CMD=${KON_CMD:-"uv run kon --model gpt-5.5"}
|
|
17
|
+
KEEP_E2E_HOME=${KEEP_E2E_HOME:-0}
|
|
18
|
+
|
|
19
|
+
# Helper functions
|
|
20
|
+
cleanup() {
|
|
21
|
+
tmux kill-session -t "$SESSION_NAME" 2>/dev/null || true
|
|
22
|
+
if [ "$KEEP_E2E_HOME" != "1" ]; then
|
|
23
|
+
rm -rf "$TEST_HOME"
|
|
24
|
+
fi
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
capture() {
|
|
28
|
+
tmux capture-pane -t "$SESSION_NAME" -p > "$1"
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
capture_config() {
|
|
32
|
+
if [ -f "$TEST_HOME/.kon/config.toml" ]; then
|
|
33
|
+
cp "$TEST_HOME/.kon/config.toml" "$1"
|
|
34
|
+
else
|
|
35
|
+
echo "CONFIG_NOT_FOUND" > "$1"
|
|
36
|
+
fi
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
# Dismiss any open completion/selector and clear the input line.
|
|
40
|
+
# Uses Escape (NOT "Esc" which tmux would send as literal text).
|
|
41
|
+
clear_input() {
|
|
42
|
+
tmux send-keys -t "$SESSION_NAME" Escape
|
|
43
|
+
sleep 0.5
|
|
44
|
+
tmux send-keys -t "$SESSION_NAME" Escape
|
|
45
|
+
sleep 0.5
|
|
46
|
+
tmux send-keys -t "$SESSION_NAME" C-u
|
|
47
|
+
sleep 0.5
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
run_command() {
|
|
51
|
+
local command="$1"
|
|
52
|
+
tmux send-keys -t "$SESSION_NAME" "$command"
|
|
53
|
+
sleep 1
|
|
54
|
+
tmux send-keys -t "$SESSION_NAME" Enter
|
|
55
|
+
sleep "$COMMAND_WAIT_TIME"
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
send_shift_tab() {
|
|
59
|
+
# tmux doesn't reliably expose a portable S-Tab key name, so send the terminal
|
|
60
|
+
# escape sequence directly: CSI Z.
|
|
61
|
+
tmux send-keys -t "$SESSION_NAME" Escape '[' 'Z'
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
send_ctrl_shift_t() {
|
|
65
|
+
# CSI-u encoding for Ctrl+Shift+T. This is more reliable in tmux than C-S-t,
|
|
66
|
+
# which collapses to Ctrl+T in many terminals.
|
|
67
|
+
tmux send-keys -t "$SESSION_NAME" Escape '[84;6u'
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
# Cleanup on exit
|
|
71
|
+
trap cleanup EXIT
|
|
72
|
+
|
|
73
|
+
# === Setup ===
|
|
74
|
+
echo "Setting up isolated e2e environment..."
|
|
75
|
+
cleanup
|
|
76
|
+
rm -rf "$TEST_DIR" "$TEST_HOME"
|
|
77
|
+
mkdir -p "$TEST_DIR" "$TEST_HOME/.kon"
|
|
78
|
+
if [ -f "$HOME/.kon/openai_auth.json" ]; then
|
|
79
|
+
cp "$HOME/.kon/openai_auth.json" "$TEST_HOME/.kon/openai_auth.json"
|
|
80
|
+
fi
|
|
81
|
+
if [ -f "$HOME/.kon/copilot_auth.json" ]; then
|
|
82
|
+
cp "$HOME/.kon/copilot_auth.json" "$TEST_HOME/.kon/copilot_auth.json"
|
|
83
|
+
fi
|
|
84
|
+
cd "$TEST_DIR" || exit 1
|
|
85
|
+
printf '# Test Project\n' > README.md
|
|
86
|
+
printf '{"name": "test"}\n' > config.json
|
|
87
|
+
|
|
88
|
+
# Let kon create its default config in the temp HOME. Runtime tests mutate only
|
|
89
|
+
# this isolated file, never the real user config.
|
|
90
|
+
|
|
91
|
+
# Clean up old test output files
|
|
92
|
+
rm -f /tmp/kon-test-*.txt
|
|
93
|
+
|
|
94
|
+
# === Start kon (from kon repo for tab completion tests) ===
|
|
95
|
+
echo "Starting kon in tmux from kon repo with HOME=$TEST_HOME..."
|
|
96
|
+
tmux new-session -d -s "$SESSION_NAME" -c "$KON_DIR" "HOME=$TEST_HOME OPENAI_API_KEY=\"${OPENAI_API_KEY:-}\" ZAI_API_KEY=\"${ZAI_API_KEY:-}\" ANTHROPIC_API_KEY=\"${ANTHROPIC_API_KEY:-}\" AZURE_AI_FOUNDRY_API_KEY=\"${AZURE_AI_FOUNDRY_API_KEY:-}\" AZURE_AI_FOUNDRY_BASE_URL=\"${AZURE_AI_FOUNDRY_BASE_URL:-}\" $KON_CMD"
|
|
97
|
+
sleep 5 # Give kon time to start and render UI
|
|
98
|
+
|
|
99
|
+
# =============================================================================
|
|
100
|
+
# Test 1: / slash commands trigger
|
|
101
|
+
# Verify: typing / shows the slash command list, including newer runtime commands
|
|
102
|
+
# =============================================================================
|
|
103
|
+
echo "Test 1: / slash commands trigger..."
|
|
104
|
+
tmux send-keys -t "$SESSION_NAME" '/'
|
|
105
|
+
sleep 2
|
|
106
|
+
capture /tmp/kon-test-1-commands.txt
|
|
107
|
+
clear_input
|
|
108
|
+
|
|
109
|
+
# =============================================================================
|
|
110
|
+
# Test 2: @ file search trigger
|
|
111
|
+
# Verify: typing @pyproject shows file picker with pyproject.toml (from kon repo)
|
|
112
|
+
# =============================================================================
|
|
113
|
+
echo "Test 2: @ file search trigger..."
|
|
114
|
+
tmux send-keys -t "$SESSION_NAME" '@pyproject'
|
|
115
|
+
sleep 2
|
|
116
|
+
capture /tmp/kon-test-2-at-trigger.txt
|
|
117
|
+
clear_input
|
|
118
|
+
|
|
119
|
+
# =============================================================================
|
|
120
|
+
# Test 3: /model command
|
|
121
|
+
# Verify: /model shows model selector list, then dismiss without selecting
|
|
122
|
+
# =============================================================================
|
|
123
|
+
echo "Test 3: /model command..."
|
|
124
|
+
tmux send-keys -t "$SESSION_NAME" '/model'
|
|
125
|
+
sleep 2
|
|
126
|
+
tmux send-keys -t "$SESSION_NAME" Enter
|
|
127
|
+
sleep "$COMMAND_WAIT_TIME"
|
|
128
|
+
capture /tmp/kon-test-3-model.txt
|
|
129
|
+
clear_input
|
|
130
|
+
|
|
131
|
+
# =============================================================================
|
|
132
|
+
# Test 4: /new command
|
|
133
|
+
# Verify: /new starts a new conversation ("Started new conversation" message)
|
|
134
|
+
# =============================================================================
|
|
135
|
+
echo "Test 4: /new command..."
|
|
136
|
+
run_command '/new'
|
|
137
|
+
capture /tmp/kon-test-4-new.txt
|
|
138
|
+
|
|
139
|
+
# =============================================================================
|
|
140
|
+
# P0 runtime mode controls and info bar
|
|
141
|
+
# =============================================================================
|
|
142
|
+
echo "Test 5: /permissions picker..."
|
|
143
|
+
tmux send-keys -t "$SESSION_NAME" '/permissions'
|
|
144
|
+
sleep 2
|
|
145
|
+
tmux send-keys -t "$SESSION_NAME" Enter
|
|
146
|
+
sleep "$COMMAND_WAIT_TIME"
|
|
147
|
+
capture /tmp/kon-test-5-permissions-picker.txt
|
|
148
|
+
clear_input
|
|
149
|
+
|
|
150
|
+
echo "Test 6: /permissions auto..."
|
|
151
|
+
run_command '/permissions auto'
|
|
152
|
+
capture /tmp/kon-test-6-permissions-auto.txt
|
|
153
|
+
capture_config /tmp/kon-test-6-permissions-auto-config.txt
|
|
154
|
+
|
|
155
|
+
echo "Test 7: /permissions prompt..."
|
|
156
|
+
run_command '/permissions prompt'
|
|
157
|
+
capture /tmp/kon-test-7-permissions-prompt.txt
|
|
158
|
+
capture_config /tmp/kon-test-7-permissions-prompt-config.txt
|
|
159
|
+
|
|
160
|
+
echo "Test 8: Shift+Tab permission cycling..."
|
|
161
|
+
send_shift_tab
|
|
162
|
+
sleep "$COMMAND_WAIT_TIME"
|
|
163
|
+
capture /tmp/kon-test-8-permissions-shift-tab.txt
|
|
164
|
+
capture_config /tmp/kon-test-8-permissions-shift-tab-config.txt
|
|
165
|
+
|
|
166
|
+
echo "Test 9: /thinking picker..."
|
|
167
|
+
tmux send-keys -t "$SESSION_NAME" '/thinking'
|
|
168
|
+
sleep 2
|
|
169
|
+
tmux send-keys -t "$SESSION_NAME" Enter
|
|
170
|
+
sleep "$COMMAND_WAIT_TIME"
|
|
171
|
+
capture /tmp/kon-test-9-thinking-picker.txt
|
|
172
|
+
clear_input
|
|
173
|
+
|
|
174
|
+
echo "Test 10: /thinking minimal..."
|
|
175
|
+
run_command '/thinking minimal'
|
|
176
|
+
capture /tmp/kon-test-10-thinking-minimal.txt
|
|
177
|
+
|
|
178
|
+
echo "Test 11: Ctrl+Shift+T thinking cycling..."
|
|
179
|
+
send_ctrl_shift_t
|
|
180
|
+
sleep "$COMMAND_WAIT_TIME"
|
|
181
|
+
capture /tmp/kon-test-11-thinking-cycle.txt
|
|
182
|
+
|
|
183
|
+
echo "Test 12: /notifications picker..."
|
|
184
|
+
tmux send-keys -t "$SESSION_NAME" '/notifications'
|
|
185
|
+
sleep 2
|
|
186
|
+
tmux send-keys -t "$SESSION_NAME" Enter
|
|
187
|
+
sleep "$COMMAND_WAIT_TIME"
|
|
188
|
+
capture /tmp/kon-test-12-notifications-picker.txt
|
|
189
|
+
clear_input
|
|
190
|
+
|
|
191
|
+
echo "Test 13: /notifications on..."
|
|
192
|
+
run_command '/notifications on'
|
|
193
|
+
capture /tmp/kon-test-13-notifications-on.txt
|
|
194
|
+
capture_config /tmp/kon-test-13-notifications-on-config.txt
|
|
195
|
+
|
|
196
|
+
echo "Test 14: /notifications off..."
|
|
197
|
+
run_command '/notifications off'
|
|
198
|
+
capture /tmp/kon-test-14-notifications-off.txt
|
|
199
|
+
capture_config /tmp/kon-test-14-notifications-off-config.txt
|
|
200
|
+
|
|
201
|
+
# =============================================================================
|
|
202
|
+
# Test 15: Tab completion - unique match
|
|
203
|
+
# Verify: typing "pypr" then Tab completes to "pyproject.toml"
|
|
204
|
+
# =============================================================================
|
|
205
|
+
echo "Test 15: Tab completion - unique match..."
|
|
206
|
+
tmux send-keys -t "$SESSION_NAME" 'pypr'
|
|
207
|
+
sleep 1
|
|
208
|
+
tmux send-keys -t "$SESSION_NAME" Tab
|
|
209
|
+
sleep 2
|
|
210
|
+
capture /tmp/kon-test-15-tab-unique.txt
|
|
211
|
+
clear_input
|
|
212
|
+
|
|
213
|
+
# =============================================================================
|
|
214
|
+
# Test 16: Tab completion - multiple alternatives (floating list)
|
|
215
|
+
# Verify: typing "src/kon/ui/s" then Tab shows a list including:
|
|
216
|
+
# selection_mode.py, session_ui.py, styles.py
|
|
217
|
+
# =============================================================================
|
|
218
|
+
echo "Test 16: Tab completion - multiple alternatives..."
|
|
219
|
+
tmux send-keys -t "$SESSION_NAME" 'src/kon/ui/s'
|
|
220
|
+
sleep 1
|
|
221
|
+
tmux send-keys -t "$SESSION_NAME" Tab
|
|
222
|
+
sleep 2
|
|
223
|
+
capture /tmp/kon-test-16-tab-multiple.txt
|
|
224
|
+
clear_input
|
|
225
|
+
|
|
226
|
+
# =============================================================================
|
|
227
|
+
# Test 17: Tab completion - nested unique file
|
|
228
|
+
# Verify: typing "src/kon/ui/widg" then Tab completes to "src/kon/ui/widgets.py"
|
|
229
|
+
# =============================================================================
|
|
230
|
+
echo "Test 17: Tab completion - nested unique file..."
|
|
231
|
+
tmux send-keys -t "$SESSION_NAME" 'src/kon/ui/widg'
|
|
232
|
+
sleep 1
|
|
233
|
+
tmux send-keys -t "$SESSION_NAME" Tab
|
|
234
|
+
sleep 2
|
|
235
|
+
capture /tmp/kon-test-17-tab-nested-unique.txt
|
|
236
|
+
clear_input
|
|
237
|
+
|
|
238
|
+
# =============================================================================
|
|
239
|
+
# Test 18: Tab completion - select from list
|
|
240
|
+
# Verify: typing "src/kon/ui/s" Tab shows list, then Enter applies first completion
|
|
241
|
+
# =============================================================================
|
|
242
|
+
echo "Test 18: Tab completion - select from list..."
|
|
243
|
+
tmux send-keys -t "$SESSION_NAME" 'src/kon/ui/s'
|
|
244
|
+
sleep 1
|
|
245
|
+
tmux send-keys -t "$SESSION_NAME" Tab
|
|
246
|
+
sleep 2
|
|
247
|
+
tmux send-keys -t "$SESSION_NAME" Enter
|
|
248
|
+
sleep 1
|
|
249
|
+
capture /tmp/kon-test-18-tab-select.txt
|
|
250
|
+
clear_input
|
|
251
|
+
|
|
252
|
+
# =============================================================================
|
|
253
|
+
# Test 19: Tool execution (multiple tool calls)
|
|
254
|
+
# Verify: creates test1.txt, edits it, lists files, calculates 3+3
|
|
255
|
+
# Running this BEFORE /resume so there's a session with messages to resume.
|
|
256
|
+
# Permission mode is auto from Shift+Tab above, so approval prompts should not block.
|
|
257
|
+
# =============================================================================
|
|
258
|
+
echo "Test 19: Tool execution..."
|
|
259
|
+
run_command '/new'
|
|
260
|
+
tmux send-keys -t "$SESSION_NAME" "Create $TEST_DIR/test1.txt containing \"hello\", then edit $TEST_DIR/test1.txt to change \"hello\" to \"world\", list files in $TEST_DIR, and calculate 3+3. Use parallel tool calls, be quick."
|
|
261
|
+
sleep 1
|
|
262
|
+
tmux send-keys -t "$SESSION_NAME" Enter
|
|
263
|
+
sleep "$WAIT_TIME"
|
|
264
|
+
capture /tmp/kon-test-19-tools.txt
|
|
265
|
+
|
|
266
|
+
# =============================================================================
|
|
267
|
+
# Test 20: /session command
|
|
268
|
+
# Verify: shows session info (messages, tokens, file path)
|
|
269
|
+
# =============================================================================
|
|
270
|
+
echo "Test 20: /session command..."
|
|
271
|
+
run_command '/session'
|
|
272
|
+
capture /tmp/kon-test-20-session.txt
|
|
273
|
+
|
|
274
|
+
# =============================================================================
|
|
275
|
+
# Test 21: /resume command
|
|
276
|
+
# Verify: shows list of sessions (at least one from tool execution above)
|
|
277
|
+
# =============================================================================
|
|
278
|
+
echo "Test 21: /resume command..."
|
|
279
|
+
tmux send-keys -t "$SESSION_NAME" '/resume'
|
|
280
|
+
sleep 2
|
|
281
|
+
tmux send-keys -t "$SESSION_NAME" Enter
|
|
282
|
+
sleep "$COMMAND_WAIT_TIME"
|
|
283
|
+
capture /tmp/kon-test-21-resume.txt
|
|
284
|
+
clear_input
|
|
285
|
+
|
|
286
|
+
# =============================================================================
|
|
287
|
+
# Capture file system/session/config state for verification
|
|
288
|
+
# =============================================================================
|
|
289
|
+
echo "Capturing file system and persisted state..."
|
|
290
|
+
ls -la "$TEST_DIR" > /tmp/kon-test-files.txt 2>/dev/null
|
|
291
|
+
find "$TEST_HOME/.kon/sessions" -type f -name '*.jsonl' -print > /tmp/kon-test-session-files.txt 2>/dev/null || true
|
|
292
|
+
capture_config /tmp/kon-test-final-config.txt
|
|
293
|
+
|
|
294
|
+
# Retry a few times in case the LLM is still finishing file writes
|
|
295
|
+
for _ in 1 2 3; do
|
|
296
|
+
if [ -f "$TEST_DIR/test1.txt" ]; then
|
|
297
|
+
cat "$TEST_DIR/test1.txt" > /tmp/kon-test-test1-content.txt
|
|
298
|
+
break
|
|
299
|
+
fi
|
|
300
|
+
sleep 3
|
|
301
|
+
done
|
|
302
|
+
# Final check
|
|
303
|
+
if [ ! -f "$TEST_DIR/test1.txt" ]; then
|
|
304
|
+
echo "FILE_NOT_FOUND" > /tmp/kon-test-test1-content.txt
|
|
305
|
+
ls -la "$TEST_DIR" > /tmp/kon-test-files.txt 2>/dev/null
|
|
306
|
+
fi
|
|
307
|
+
|
|
308
|
+
printf '\n%s\n' "${SEP:-==============================}"
|
|
309
|
+
echo "All tests complete"
|
|
310
|
+
echo "Output files saved to /tmp/kon-test-*.txt"
|
|
311
|
+
echo "Temp HOME: $TEST_HOME (KEEP_E2E_HOME=1 to keep after run)"
|
|
312
|
+
printf '%s\n' "${SEP:-==============================}"
|
|
@@ -6,6 +6,61 @@ All notable changes to this project will be documented in this file.
|
|
|
6
6
|
|
|
7
7
|
- No changes yet.
|
|
8
8
|
|
|
9
|
+
## 0.3.7 - 2026-05-02
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Added shell command execution from within Kon - @sukhbinder, with review help from @Meltedd.
|
|
14
|
+
- Added shell command input highlighting.
|
|
15
|
+
- Added shell command execution state handling, cancellation support, and output truncation/display controls - @sukhbinder, with review help from @Meltedd.
|
|
16
|
+
- Added slash controls for runtime modes.
|
|
17
|
+
- Added persisted runtime setting helpers.
|
|
18
|
+
- Added permission mode display in the info bar.
|
|
19
|
+
- Added standardized thinking levels.
|
|
20
|
+
- Added audio notifications with configurable volume.
|
|
21
|
+
- Added textual bell notifications for approval prompts - @sukhbinder.
|
|
22
|
+
- Added keyboard navigation to the permission approval popup - @mvanhorn, with review help from @Meltedd.
|
|
23
|
+
- Added GPT-5.5 models.
|
|
24
|
+
- Added more built-in themes.
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
- Centralized conversation runtime orchestration.
|
|
29
|
+
- Made permission and notification toggles session-scoped.
|
|
30
|
+
- Restored minimal thinking level across providers.
|
|
31
|
+
- Unified `/help` and `/session` output formatting with aligned columns.
|
|
32
|
+
- Refined help/session column spacing.
|
|
33
|
+
- Used `batch_update` to reduce completion list transition flicker.
|
|
34
|
+
- Deduplicated command selection pickers.
|
|
35
|
+
- Removed dead disk-persisting permission/notification helpers.
|
|
36
|
+
- Removed `show_full_output` from bash parameters - @sukhbinder, based on review feedback from @Meltedd.
|
|
37
|
+
|
|
38
|
+
### Fixed
|
|
39
|
+
|
|
40
|
+
- Fixed safe escaping for diff markup.
|
|
41
|
+
- Fixed interrupted and long-running shell command handling - @sukhbinder, with review help from @Meltedd.
|
|
42
|
+
- Fixed actual line-count handling for output truncation and display limits - @sukhbinder.
|
|
43
|
+
- Fixed keyboard event forwarding for approval popup navigation - @mvanhorn, based on review feedback from @Meltedd.
|
|
44
|
+
- Fixed InfoBar row label assignment.
|
|
45
|
+
- Fixed status hint layout updates.
|
|
46
|
+
- Fixed streaming markdown to defer until newline.
|
|
47
|
+
- Fixed notification sound behavior and switched to WAV notification sounds.
|
|
48
|
+
- Fixed Textual theme updates.
|
|
49
|
+
- Refined Everforest theme colors.
|
|
50
|
+
- Fixed markdown heading and table header styling to use bold-only formatting.
|
|
51
|
+
- Fixed scroll-to-bottom behavior on new user message submit.
|
|
52
|
+
- Fixed file change totals placement in modal title.
|
|
53
|
+
- Worked around `html-to-markdown` 3.3.x regression - @bkutasi.
|
|
54
|
+
- Reverted thinking block left border color to `colors.border`.
|
|
55
|
+
|
|
56
|
+
### Docs / Tests
|
|
57
|
+
|
|
58
|
+
- Added e2e coverage review documentation.
|
|
59
|
+
- Expanded tmux e2e runtime coverage.
|
|
60
|
+
- Updated README notification config example.
|
|
61
|
+
- Updated shell command tests - @sukhbinder, based on review feedback from @Meltedd.
|
|
62
|
+
- Added approval keyboard navigation tests - @mvanhorn, based on review feedback from @Meltedd.
|
|
63
|
+
|
|
9
64
|
## 0.3.6 - 2026-04-23
|
|
10
65
|
|
|
11
66
|
### Added
|