From ef64b388d97d8bd458cd0c15b4d923d6ca66c76e Mon Sep 17 00:00:00 2001 From: shy Date: Sat, 8 Feb 2025 09:38:36 +0800 Subject: [PATCH] add some --- etc/exit.shy | 1 + etc/init.shy | 2 ++ go.mod | 2 +- src/client/client.go | 15 +++++++++++++++ src/main.go | 4 +++- src/server/server.go | 15 +++++++++++++++ 6 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 etc/exit.shy create mode 100644 etc/init.shy create mode 100644 src/client/client.go create mode 100644 src/server/server.go diff --git a/etc/exit.shy b/etc/exit.shy new file mode 100644 index 0000000..a142f20 --- /dev/null +++ b/etc/exit.shy @@ -0,0 +1 @@ +~ssh diff --git a/etc/init.shy b/etc/init.shy new file mode 100644 index 0000000..6de1689 --- /dev/null +++ b/etc/init.shy @@ -0,0 +1,2 @@ +~ssh + source local.shy diff --git a/go.mod b/go.mod index 63ed8e0..03dcdc1 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/shylinux/ollama-story +module shylinux.com/x/ollama-story go 1.13 diff --git a/src/client/client.go b/src/client/client.go new file mode 100644 index 0000000..a138721 --- /dev/null +++ b/src/client/client.go @@ -0,0 +1,15 @@ +package client + +import "shylinux.com/x/ice" + +type client struct { + ice.Hash + + list string `name:"list hash auto" help:"client"` +} + +func (s client) List(m *ice.Message, arg ...string) { + s.Hash.List(m, arg...) +} + +func init() { ice.Cmd("web.chat.client.client", client{}) } \ No newline at end of file diff --git a/src/main.go b/src/main.go index 5addb64..414747c 100644 --- a/src/main.go +++ b/src/main.go @@ -1,5 +1,7 @@ package main import "shylinux.com/x/ice" +import _ "shylinux.com/x/ollama-story/src/server" +import _ "shylinux.com/x/ollama-story/src/client" -func main() { print(ice.Run()) } \ No newline at end of file +func main() { print(ice.Run()) } diff --git a/src/server/server.go b/src/server/server.go new file mode 100644 index 0000000..c838a10 --- /dev/null +++ b/src/server/server.go @@ -0,0 +1,15 @@ +package server + +import "shylinux.com/x/ice" + +type server struct { + ice.Hash + + list string `name:"list hash auto" help:"server"` +} + +func (s server) List(m *ice.Message, arg ...string) { + s.Hash.List(m, arg...) +} + +func init() { ice.Cmd("web.chat.server.server", server{}) } \ No newline at end of file