mirror of
https://github.com/cline/cline.git
synced 2026-09-16 06:32:31 +08:00
* feat(hooks): Initial implementation of UI output in the CLI * feat(hooks): Display hooks UI output in the CLI nicely * feat(hooks): Improvements to the hooks CLI implementation * feat(hooks): Changes as per Cline's code review of hooks CLI PR * feat(hooks): Make comments more concise and to the point * feat(hooks): Minor improvements to code complexity * feat(cli): polish hook status output (headers, paths, spacing) - Align hook headings with ToolRenderer-style language - Prefer workspace-relative paths for hook scripts - Document hook_output_stream suppression + future grouping - Add unit tests for rendering + path formatting * feat(hooks): Isolate hook handlers and harden path handling - Move hook-specific SAY handling into say_handlers_hooks.go - Use os.UserHomeDir + filepath.Rel for more portable hook path shortening - Document why hooks render from state stream (ordering/reordering) - Standardize on filepath for filesystem paths in cline-clients - Avoid silently ignoring os.Getwd() errors in dev fallback resolution * feat(hooks): Add pendingToolInfo to hook status in the CLI * feat(hooks): Fix verbose output to CLI * feat(hooks): Add changeset commit. * feat(hooks): code review feedback - make paths OS-agnostic * feat(hooks): code review feedback - use strings.Builder * feat(hooks): code review feedback - no need to normalize say type * feat(hooks): code review feedback - define HookOutputStreamMeta type * feat(hooks): code review feedback - remove dynamic import * feat(hooks): code review feedback - turn repetitive logic into helper function and make say type names reflect proto field names * feat(hooks): code review feedback - remove unrelated changes * feat(hooks): prepend hook script path with repo name
21 lines
432 B
Go
21 lines
432 B
Go
package display
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/cline/cli/pkg/cli/types"
|
|
)
|
|
|
|
func TestStreamingSegment_generateRichHeader_HookIsEmpty(t *testing.T) {
|
|
ss := &StreamingSegment{
|
|
sayType: string(types.SayTypeHookStatus),
|
|
prefix: "HOOK",
|
|
msg: &types.ClineMessage{},
|
|
}
|
|
|
|
header := ss.generateRichHeader()
|
|
if header != "" {
|
|
t.Fatalf("expected empty header for hook segments to avoid double-render, got: %q", header)
|
|
}
|
|
}
|