mirror of
https://github.com/cline/cline.git
synced 2026-09-17 17:45:33 +08:00
* super sketchy big merge with main * gitignore * gitignore * Delete cli/bin/air * Delete cli/bin directory * Delete cli/cline-host * Fix missing package.json in cli Copy the package JSON into the dist-standalone dir during compilation. Remove workaround for missing package.json * Update scripts/build-cli.sh Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * Remove reference to watchservice, it has been removed * Update scripts/build-go-proto.mjs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix timestamp to string conversion * diff.go ellipsis fix * COMMON_TYPES --------- Co-authored-by: Sarah Fortune <sarah.fortune@gmail.com> Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
44 lines
1001 B
Go
44 lines
1001 B
Go
package hostbridge
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"log"
|
|
)
|
|
|
|
// Simple implementations that don't rely on proto files for now
|
|
// This allows us to test the basic hostbridge structure
|
|
|
|
// SimpleService provides basic hostbridge functionality
|
|
type SimpleService struct {
|
|
coreAddress string
|
|
verbose bool
|
|
}
|
|
|
|
// NewSimpleService creates a new SimpleService
|
|
func NewSimpleService(coreAddress string, verbose bool) *SimpleService {
|
|
return &SimpleService{
|
|
coreAddress: coreAddress,
|
|
verbose: verbose,
|
|
}
|
|
}
|
|
|
|
// Start starts the simple hostbridge service
|
|
func (s *SimpleService) Start(ctx context.Context) error {
|
|
if s.verbose {
|
|
log.Printf("Starting simple hostbridge service (connecting to core at %s)", s.coreAddress)
|
|
}
|
|
|
|
// For now, just log that we're running
|
|
fmt.Printf("[Cline Host Bridge] Service started on core address: %s\n", s.coreAddress)
|
|
|
|
// Keep running until context is cancelled
|
|
<-ctx.Done()
|
|
|
|
if s.verbose {
|
|
log.Println("Simple hostbridge service stopped")
|
|
}
|
|
|
|
return nil
|
|
}
|