chat: serve glean chat from the platform Chat API

Aberta
#168 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
48/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
go
Domínio
api, cli

Direção de pesquisa

Start with internal/client/stream.go and compare the platform-first fallback used by search and agents; check the api-client-go Chat methods named in the issue. Trace how glean chat, glean agent-help, and --dry-run are wired. Done means chat streams from /api/chat by default, GLEAN_LEGACY_APIS=1 uses the classic API, and the dry run shows the platform request shape.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

enhancement

glean chat still calls the classic POST /rest/api/v1/chat through a hand-rolled NDJSON stream (internal/client/stream.go). The platform Chat API is GA, and api-client-go v0.17.3 (on main since v0.18.0) models it: Glean.Chat.Create, Glean.Chat.CreateStream and Glean.Chat.Update.

Proposal

  • Serve glean chat from POST /api/chat, streaming through Glean.Chat.CreateStream, with the same platform-first fallback that search and agents use.
  • Remove the hand-rolled stream client once the classic path is only the fallback.
  • Consider a way to continue a conversation, since the platform response carries a chat ID and PATCH /api/chats/{chat_id} exists.

Done when

  • glean agent-help shows chat with api: platform.
  • glean chat "..." streams from /api/chat by default, and GLEAN_LEGACY_APIS=1 still uses the classic API.
  • --dry-run prints the platform request shape.
Linguagem predominante
Go
Estrelas
65
Forks
8
Merge médio
5d 7h
PRs com merge (30d)
3

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de gleanwork/glean-cli

Todas as issues de gleanwork/glean-cli

Issues semelhantes

Mais issues de Go

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.