Skip to content

Commit 38c48ef

Browse files
committed
Add AI chatbot
1 parent 301dcbe commit 38c48ef

File tree

7 files changed

+26
-8
lines changed

7 files changed

+26
-8
lines changed

Justfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env -S just --justfile
2+
3+
default:
4+
@just --list
5+
6+
install:
7+
pnpm install
8+
9+
build:
10+
pnpm build
11+
12+
start:
13+
go run server/main.go
14+
15+
tidy:
16+
pnpm format
17+
pnpm lint

edit-me/content/additional-items/01-ai.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ title: AI Command Line Tool
66

77
This AI tool assists you with all the tasks beyond file editing on
88
your system complementing Continue, Cline and the like.
9-
Specialist agents: shell, web, git, pr, code/html, sql make you much more productive...
9+
Specialist agents: shell, web, git, pr, code/html, sql make you much more productive...
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: AI Chatbot
3+
---
4+
5+
🤖 [https://github.com/qiangli/chatbot](https://github.com/qiangli/chatbot)
6+
7+
AI Chatbot is a lightweight web AI chat agent built with vite+react+ts to work with [AI Command Line Tool](https://github.com/qiangli/ai) hub services.
File renamed without changes.
File renamed without changes.
File renamed without changes.

server/main.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,18 @@ import (
66
"os"
77
)
88

9-
// simple static page web server serve files with a given local directory
109
func main() {
11-
// Set the directory to serve files from
1210
directory := "out/" // Change this path to your preferred directory
1311

14-
// Create a file server handler
1512
fileServer := http.FileServer(http.Dir(directory))
1613

17-
// Use the file server to handle all requests at the root url "/"
1814
http.Handle("/", fileServer)
1915

20-
// Get the port from the environment variables or use default
2116
port := os.Getenv("PORT")
2217
if port == "" {
23-
port = "8080" // Default port
18+
port = "18080" // Default port
2419
}
2520

26-
// Start the server
2721
log.Printf("Starting server on port %s...", port)
2822
if err := http.ListenAndServe(":"+port, nil); err != nil {
2923
log.Fatal(err)

0 commit comments

Comments
 (0)