feat: add automatic greeting upon connection (#42)
CI / Lint & Test (push) Successful in 14m0s
CI / Build Linux (push) Successful in 16m33s
CI / Build Windows (cross-compile) (push) Successful in 26m23s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m5s

### Explanation

_No response_

### Issue

Closes #23

### Attestations

- [ ] I have read and agree to the [Code of Conduct](https://docs.nhcarrigan.com/community/coc/)
- [ ] I have read and agree to the [Community Guidelines](https://docs.nhcarrigan.com/community/guide/).
- [ ] My contribution complies with the [Contributor Covenant](https://docs.nhcarrigan.com/dev/covenant/).

### Dependencies

- [ ] I have pinned the dependencies to a specific patch version.

### Style

- [ ] I have run the linter and resolved any errors.
- [ ] My pull request uses an appropriate title, matching the conventional commit standards.
- [ ] My scope of feat/fix/chore/etc. correctly matches the nature of changes in my pull request.

### Tests

- [ ] My contribution adds new code, and I have added tests to cover it.
- [ ] My contribution modifies existing code, and I have updated the tests to reflect these changes.
- [ ] All new and existing tests pass locally with my changes.
- [ ] Code coverage remains at or above the configured threshold.

### Documentation

_No response_

### Versioning

_No response_

Reviewed-on: #42
Co-authored-by: Naomi Carrigan <commits@nhcarrigan.com>
Co-committed-by: Naomi Carrigan <commits@nhcarrigan.com>
This commit was merged in pull request #42.
This commit is contained in:
2026-01-16 15:10:28 -08:00
committed by Naomi Carrigan
parent 2220c26c5e
commit ac84366716
5 changed files with 123 additions and 2 deletions
+40
View File
@@ -9,6 +9,8 @@
mcp_servers_json: null,
auto_granted_tools: [],
theme: "dark",
greeting_enabled: true,
greeting_custom_prompt: null,
});
let isOpen = $state(false);
@@ -220,6 +222,44 @@
</div>
</section>
<!-- Greeting Section -->
<section class="mb-6">
<h3 class="text-sm font-medium text-[var(--accent-primary)] uppercase tracking-wider mb-3">
Greeting
</h3>
<!-- Enable/Disable Toggle -->
<div class="mb-4">
<label class="flex items-center gap-3 cursor-pointer">
<input
type="checkbox"
bind:checked={config.greeting_enabled}
class="w-4 h-4 rounded border-[var(--border-color)] bg-[var(--bg-primary)] text-[var(--accent-primary)] focus:ring-[var(--accent-primary)]"
/>
<span class="text-sm text-gray-300">Send greeting on connect</span>
</label>
<p class="text-xs text-gray-500 mt-1 ml-7">
Automatically greet you when a session starts with time-based messages
</p>
</div>
<!-- Custom Greeting Prompt -->
{#if config.greeting_enabled}
<div class="mb-4">
<label for="greeting-prompt" class="block text-sm text-gray-400 mb-1">
Custom Greeting Prompt <span class="text-gray-600">(optional)</span>
</label>
<textarea
id="greeting-prompt"
bind:value={config.greeting_custom_prompt}
rows="3"
placeholder="Leave empty for time-based greetings, or customize how you'd like to be greeted..."
class="w-full px-3 py-2 bg-[var(--bg-primary)] border border-[var(--border-color)] rounded-lg text-[var(--text-primary)] focus:outline-none focus:border-[var(--accent-primary)] resize-none"
></textarea>
</div>
{/if}
</section>
<!-- MCP Servers Section -->
<section class="mb-6">
<h3 class="text-sm font-medium text-[var(--accent-primary)] uppercase tracking-wider mb-3">