Skip to content

Commit 04a23a0

Browse files
authored
Merge pull request #46 from BalanceBalls/readme-updates
Add scroll percentage label
2 parents 5937289 + 66a263e commit 04a23a0

File tree

8 files changed

+65
-13
lines changed

8 files changed

+65
-13
lines changed

.goreleaser-windows.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,7 @@ chocolateys:
3737
license_url: "https://github.com/BalanceBalls/nekot/blob/main/LICENSE"
3838
bug_tracker_url: "https://github.com/BalanceBalls/nekot/issues"
3939
release_notes: "https://github.com/BalanceBalls/nekot/releases/tag/{{ .Tag }}"
40-
copyright: "Copyright 2025 Aleksandr Shevchuk"
40+
icon_url: "https://raw.githubusercontent.com/BalanceBalls/nekot/main/docs/images/icon.png"
41+
summary: "A powerful and intuitive terminal utility for interaction with both local and cloud LLMs"
42+
package_source_url: "https://github.com/BalanceBalls/nekot/releases/tag/{{ .Tag }}"
43+
copyright: "Copyright 2025 Aleksandr Shevchuk"

.goreleaser.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,13 @@ homebrew_casks:
4444
conflicts:
4545
- formula: nekot
4646
commit_author:
47-
name: BalanceBalls
47+
name: BalanceBalls
4848
hooks:
4949
post:
5050
install: |
51-
if system_command("/usr/bin/xattr", args: ["-h"]).exit_status == 0
52-
system_command "/usr/bin/xattr", args: ["-d", "com.apple.quarantine", "#{staged_path}/nekot"]
51+
if OS.mac?
52+
if system_command("/usr/bin/xattr", args: ["-h"]).exit_status == 0
53+
system_command "/usr/bin/xattr", args: ["-d", "com.apple.quarantine", "#{staged_path}/nekot"]
54+
end
5355
end
5456
skip_upload: auto

README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
# NEKOT
1+
<p align="center">
2+
<img src="./docs/images/nekot-logo.png" width="250" title="logo">
3+
<h1 align="center">
4+
NEKOT
5+
</h1>
26

3-
**A powerful and intuitive terminal utility for interaction with both local and cloud LLMs.**
7+
**A powerful and intuitive terminal utility for interacting with both local and cloud LLMs.**
48

59
A tool for those who appreciate keyboard driven apps and terminal workflows
610

11+
</p>
12+
713
## Features
814
* 📦 **Single binary** - lightweight, zero dependencies, use anywhere without any requirements
915
* 🤖 **Support for OpenAI compatible APIs** (ChatGPT, Mistral, Ollama, LMStudio, and more)
@@ -22,13 +28,19 @@ A tool for those who appreciate keyboard driven apps and terminal workflows
2228

2329
**Ensure API keys are set before proceeding to installtion**
2430

25-
### Homebrew (MacOS)
31+
### Homebrew (MacOS, Linux)
2632

2733
```bash
2834
brew tap BalanceBalls/BalanceBalls
2935
brew install nekot --cask
3036
```
3137

38+
### Chocolatey (Windows)
39+
40+
```bash
41+
choco install nekot
42+
```
43+
3244
### Shell script (Linux, MacOS)
3345

3446
Requires `curl` and `tar`.
@@ -281,9 +293,9 @@ rc-nekot
281293
<table>
282294
<tbody>
283295
<tr>
296+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/BalanceBalls"><img src="https://avatars.githubusercontent.com/u/29193297?v=4?s=100" width="100px;" alt="BalanceBalls"/><br /><sub><b>BalanceBalls</b></sub></a><br /><a href="#doc-BalanceBalls" title="Documentation">📖</a> <a href="#code-BalanceBalls" title="Code">💻</a></td>
284297
<td align="center" valign="top" width="14.28%"><a href="https://twitter.com/tearingitup786"><img src="https://avatars.githubusercontent.com/u/16584942?v=4?s=100" width="100px;" alt="Taranveer (Taran) Bains"/><br /><sub><b>Taranveer (Taran) Bains</b></sub></a><br /><a href="#doc-tearingItUp786" title="Documentation">📖</a> <a href="#maintenance-tearingItUp786" title="Maintenance">🚧</a> <a href="#review-tearingItUp786" title="Reviewed Pull Requests">👀</a> <a href="#code-tearingItUp786" title="Code">💻</a></td>
285298
<td align="center" valign="top" width="14.28%"><a href="https://www.tjmiller.me"><img src="https://avatars.githubusercontent.com/u/5108034?v=4?s=100" width="100px;" alt="TJ Miller"/><br /><sub><b>TJ Miller</b></sub></a><br /><a href="#doc-sixlive" title="Documentation">📖</a> <a href="#code-sixlive" title="Code">💻</a></td>
286-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/BalanceBalls"><img src="https://avatars.githubusercontent.com/u/29193297?v=4?s=100" width="100px;" alt="BalanceBalls"/><br /><sub><b>BalanceBalls</b></sub></a><br /><a href="#doc-BalanceBalls" title="Documentation">📖</a> <a href="#code-BalanceBalls" title="Code">💻</a></td>
287299
</tr>
288300
</tbody>
289301
</table>

docs/images/icon.png

9.13 KB
Loading

docs/images/nekot-logo.png

36.3 KB
Loading

panes/chat-pane.go

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ var chatContainerStyle = lipgloss.NewStyle().
6161
Border(lipgloss.ThickBorder()).
6262
MarginRight(util.ChatPaneMarginRight)
6363

64+
var infoBarStyle = lipgloss.NewStyle().
65+
BorderTop(true).
66+
BorderStyle(lipgloss.HiddenBorder())
67+
6468
func NewChatPane(ctx context.Context, w, h int) ChatPane {
6569
chatView := viewport.New(w, h)
6670
msgChan := make(chan util.ProcessApiCompletionResponse)
@@ -79,6 +83,11 @@ func NewChatPane(ctx context.Context, w, h int) ChatPane {
7983
Height(h).
8084
BorderForeground(colors.NormalTabBorderColor)
8185

86+
infoBarStyle = infoBarStyle.
87+
Width(w).
88+
BorderForeground(colors.MainColor).
89+
Foreground(colors.HighlightColor)
90+
8291
return ChatPane{
8392
mainCtx: ctx,
8493
keyMap: defaultChatPaneKeyMap,
@@ -247,7 +256,13 @@ func (p ChatPane) View() string {
247256
borderColor = p.colors.ActiveTabBorderColor
248257
}
249258

250-
return p.chatContainer.BorderForeground(borderColor).Render(viewportContent)
259+
if len(p.sessionContent) == 0 {
260+
return p.chatContainer.BorderForeground(borderColor).Render(viewportContent)
261+
}
262+
263+
infoRow := p.renderInfoRow()
264+
content := lipgloss.JoinVertical(lipgloss.Left, viewportContent, infoRow)
265+
return p.chatContainer.BorderForeground(borderColor).Render(content)
251266
}
252267

253268
func (p ChatPane) DisplayError(error string) string {
@@ -266,10 +281,29 @@ func (p ChatPane) GetWidth() int {
266281
return p.chatContainer.GetWidth()
267282
}
268283

284+
func (p ChatPane) renderInfoRow() string {
285+
percent := p.chatView.ScrollPercent()
286+
287+
info := fmt.Sprintf("▐ [%.f%%]", percent*100)
288+
if percent == 0 {
289+
info = "▐ [Top]"
290+
}
291+
if percent == 1 {
292+
info = "▐ [Bottom]"
293+
}
294+
295+
if p.quickChatActive {
296+
info += " | [Quick chat]"
297+
}
298+
299+
infoBar := infoBarStyle.Width(p.chatView.Width).Render(info)
300+
return infoBar
301+
}
302+
269303
func (p ChatPane) initializePane(session sessions.Session) (ChatPane, tea.Cmd) {
270304
paneWidth, paneHeight := util.CalcChatPaneSize(p.terminalWidth, p.terminalHeight, p.viewMode)
271305
if !p.isChatPaneReady {
272-
p.chatView = viewport.New(paneWidth, paneHeight)
306+
p.chatView = viewport.New(paneWidth, paneHeight-2)
273307
p.isChatPaneReady = true
274308
}
275309

@@ -306,7 +340,7 @@ func (p ChatPane) handleWindowResize(width int, height int) ChatPane {
306340
p.terminalHeight = height
307341

308342
w, h := util.CalcChatPaneSize(p.terminalWidth, p.terminalHeight, p.viewMode)
309-
p.chatView.Height = h
343+
p.chatView.Height = h - 2
310344
p.chatView.Width = w
311345
p.chatContainer = p.chatContainer.Width(w).Height(h)
312346

util/glamour-styles/blue.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
},
2525
"h1": {
2626
"prefix": " ",
27-
"suf#bd93f9fix": " ",
27+
"suffix": " ",
2828
"color": "15",
2929
"background_color": "131"
3030
},

util/shared-colors.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ var (
4040
cyan = "#c3f7f5"
4141
lightGreen = "#a0d390"
4242
blue = "#6b81c5"
43+
smoothRed = "#af5f5f"
4344
)
4445

4546
var (
@@ -80,7 +81,7 @@ func (s ColorScheme) GetColors() SchemeColors {
8081
return SchemeColors{
8182
MainColor: lipgloss.Color(pinkYellow),
8283
AccentColor: lipgloss.Color(lightGreen),
83-
HighlightColor: lipgloss.Color(blue),
84+
HighlightColor: lipgloss.Color(smoothRed),
8485
DefaultTextColor: lipgloss.Color(white),
8586
ErrorColor: lipgloss.Color(red),
8687
NormalTabBorderColor: lipgloss.Color(smoothBlue),

0 commit comments

Comments
 (0)