Skip to content

docs: fix typos #163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const (
type Agent struct {
Model models.ModelID `json:"model"`
MaxTokens int64 `json:"maxTokens"`
ReasoningEffort string `json:"reasoningEffort"` // For openai models low,medium,heigh
ReasoningEffort string `json:"reasoningEffort"` // For openai models low,medium,height
}

// Provider defines configuration for an LLM provider.
Expand Down
2 changes: 1 addition & 1 deletion internal/history/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type File struct {
}

type Service interface {
pubsub.Suscriber[File]
pubsub.Subscriber[File]
Create(ctx context.Context, sessionID, path, content string) (File, error)
CreateVersion(ctx context.Context, sessionID, path, content string) (File, error)
Get(ctx context.Context, id string) (File, error)
Expand Down
14 changes: 7 additions & 7 deletions internal/llm/agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ type AgentEvent struct {
}

type Service interface {
pubsub.Suscriber[AgentEvent]
pubsub.Subscriber[AgentEvent]
Model() models.Model
Run(ctx context.Context, sessionID string, content string, attachments ...message.Attachment) (<-chan AgentEvent, error)
Cancel(sessionID string)
Expand Down Expand Up @@ -251,15 +251,15 @@ func (a *agent) processGeneration(ctx context.Context, sessionID, content string
return a.err(fmt.Errorf("failed to get session: %w", err))
}
if session.SummaryMessageID != "" {
summaryMsgInex := -1
summaryMsgIndex := -1
for i, msg := range msgs {
if msg.ID == session.SummaryMessageID {
summaryMsgInex = i
summaryMsgIndex = i
break
}
}
if summaryMsgInex != -1 {
msgs = msgs[summaryMsgInex:]
if summaryMsgIndex != -1 {
msgs = msgs[summaryMsgIndex:]
msgs[0].Role = message.User
}
}
Expand Down Expand Up @@ -422,8 +422,8 @@ out:
return assistantMsg, &msg, err
}

func (a *agent) finishMessage(ctx context.Context, msg *message.Message, finishReson message.FinishReason) {
msg.AddFinish(finishReson)
func (a *agent) finishMessage(ctx context.Context, msg *message.Message, finishReason message.FinishReason) {
msg.AddFinish(finishReason)
_ = a.messages.Update(ctx, *msg)
}

Expand Down
2 changes: 1 addition & 1 deletion internal/llm/provider/anthropic.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func (a *anthropicClient) preparedMessages(messages []anthropic.MessageParam, to
}
}

func (a *anthropicClient) send(ctx context.Context, messages []message.Message, tools []tools.BaseTool) (resposne *ProviderResponse, err error) {
func (a *anthropicClient) send(ctx context.Context, messages []message.Message, tools []tools.BaseTool) (response *ProviderResponse, err error) {
preparedMessages := a.preparedMessages(a.convertMessages(messages), a.convertTools(tools))
cfg := config.Get()
if cfg.Debug {
Expand Down
4 changes: 2 additions & 2 deletions internal/logging/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ type LogMessage struct {
ID string
Time time.Time
Level string
Persist bool // used when we want to show the mesage in the status bar
PersistTime time.Duration // used when we want to show the mesage in the status bar
Persist bool // used when we want to show the message in the status bar
PersistTime time.Duration // used when we want to show the message in the status bar
Message string `json:"msg"`
Attributes []Attr
}
Expand Down
6 changes: 3 additions & 3 deletions internal/lsp/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func HandleWorkspaceConfiguration(params json.RawMessage) (any, error) {
func HandleRegisterCapability(params json.RawMessage) (any, error) {
var registerParams protocol.RegistrationParams
if err := json.Unmarshal(params, &registerParams); err != nil {
logging.Error("Error unmarshaling registration params", "error", err)
logging.Error("Error unmarshalling registration params", "error", err)
return nil, err
}

Expand All @@ -34,7 +34,7 @@ func HandleRegisterCapability(params json.RawMessage) (any, error) {

var options protocol.DidChangeWatchedFilesRegistrationOptions
if err := json.Unmarshal(optionsJSON, &options); err != nil {
logging.Error("Error unmarshaling registration options", "error", err)
logging.Error("Error unmarshalling registration options", "error", err)
continue
}

Expand Down Expand Up @@ -97,7 +97,7 @@ func HandleServerMessage(params json.RawMessage) {
func HandleDiagnostics(client *Client, params json.RawMessage) {
var diagParams protocol.PublishDiagnosticsParams
if err := json.Unmarshal(params, &diagParams); err != nil {
logging.Error("Error unmarshaling diagnostics params", "error", err)
logging.Error("Error unmarshalling diagnostics params", "error", err)
return
}

Expand Down
2 changes: 1 addition & 1 deletion internal/lsp/protocol/tsprotocol.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/message/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type CreateMessageParams struct {
}

type Service interface {
pubsub.Suscriber[Message]
pubsub.Subscriber[Message]
Create(ctx context.Context, sessionID string, params CreateMessageParams) (Message, error)
Update(ctx context.Context, message Message) error
Get(ctx context.Context, id string) (Message, error)
Expand Down
6 changes: 3 additions & 3 deletions internal/permission/permission.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ type PermissionRequest struct {
}

type Service interface {
pubsub.Suscriber[PermissionRequest]
GrantPersistant(permission PermissionRequest)
pubsub.Subscriber[PermissionRequest]
GrantPersistent(permission PermissionRequest)
Grant(permission PermissionRequest)
Deny(permission PermissionRequest)
Request(opts CreatePermissionRequest) bool
Expand All @@ -49,7 +49,7 @@ type permissionService struct {
autoApproveSessions []string
}

func (s *permissionService) GrantPersistant(permission PermissionRequest) {
func (s *permissionService) GrantPersistent(permission PermissionRequest) {
respCh, ok := s.pendingRequests.Load(permission.ID)
if ok {
respCh.(chan bool) <- true
Expand Down
2 changes: 1 addition & 1 deletion internal/pubsub/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const (
DeletedEvent EventType = "deleted"
)

type Suscriber[T any] interface {
type Subscriber[T any] interface {
Subscribe(context.Context) <-chan Event[T]
}

Expand Down
2 changes: 1 addition & 1 deletion internal/session/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type Session struct {
}

type Service interface {
pubsub.Suscriber[Session]
pubsub.Subscriber[Session]
Create(ctx context.Context, title string) (Session, error)
CreateTitleSession(ctx context.Context, parentSessionID string) (Session, error)
CreateTaskSession(ctx context.Context, toolCallID, parentSessionID, title string) (Session, error)
Expand Down
6 changes: 3 additions & 3 deletions internal/tui/components/chat/editor.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type EditorKeyMaps struct {
OpenEditor key.Binding
}

type bluredEditorKeyMaps struct {
type blurredEditorKeyMaps struct {
Send key.Binding
Focus key.Binding
OpenEditor key.Binding
Expand Down Expand Up @@ -71,7 +71,7 @@ var DeleteKeyMaps = DeleteAttachmentKeyMaps{
),
DeleteAllAttachments: key.NewBinding(
key.WithKeys("r"),
key.WithHelp("ctrl+r+r", "delete all attchments"),
key.WithHelp("ctrl+r+r", "delete all attachments"),
),
}

Expand Down Expand Up @@ -198,7 +198,7 @@ func (m *editorCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
m.deleteMode = false
return m, nil
}
// Hanlde Enter key
// Handle Enter key
if m.textarea.Focused() && key.Matches(msg, editorMaps.Send) {
value := m.textarea.Value()
if len(value) > 0 && value[len(value)-1] == '\\' {
Expand Down
8 changes: 4 additions & 4 deletions internal/tui/components/core/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,12 @@ func (m statusCmp) View() string {
Background(t.BackgroundDarker()).
Render(m.projectDiagnostics())

availableWidht := max(0, m.width-lipgloss.Width(helpWidget)-lipgloss.Width(m.model())-lipgloss.Width(diagnostics)-tokenInfoWidth)
availableWidth := max(0, m.width-lipgloss.Width(helpWidget)-lipgloss.Width(m.model())-lipgloss.Width(diagnostics)-tokenInfoWidth)

if m.info.Msg != "" {
infoStyle := styles.Padded().
Foreground(t.Background()).
Width(availableWidht)
Width(availableWidth)

switch m.info.Type {
case util.InfoTypeInfo:
Expand All @@ -159,7 +159,7 @@ func (m statusCmp) View() string {
infoStyle = infoStyle.Background(t.Error())
}

infoWidth := availableWidht - 10
infoWidth := availableWidth - 10
// Truncate message if it's longer than available width
msg := m.info.Msg
if len(msg) > infoWidth && infoWidth > 0 {
Expand All @@ -170,7 +170,7 @@ func (m statusCmp) View() string {
status += styles.Padded().
Foreground(t.Text()).
Background(t.BackgroundSecondary()).
Width(availableWidht).
Width(availableWidth).
Render("")
}

Expand Down
10 changes: 5 additions & 5 deletions internal/tui/components/logs/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ func (i *tableCmp) GetSize() (int, int) {
func (i *tableCmp) SetSize(width int, height int) tea.Cmd {
i.table.SetWidth(width)
i.table.SetHeight(height)
cloumns := i.table.Columns()
for i, col := range cloumns {
col.Width = (width / len(cloumns)) - 2
cloumns[i] = col
columns := i.table.Columns()
for i, col := range columns {
col.Width = (width / len(columns)) - 2
columns[i] = col
}
i.table.SetColumns(cloumns)
i.table.SetColumns(columns)
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion internal/tui/tui.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ func (a appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
case dialog.PermissionAllow:
a.app.Permissions.Grant(msg.Permission)
case dialog.PermissionAllowForSession:
a.app.Permissions.GrantPersistant(msg.Permission)
a.app.Permissions.GrantPersistent(msg.Permission)
case dialog.PermissionDeny:
a.app.Permissions.Deny(msg.Permission)
}
Expand Down