Ingest: a crawl source for sites without a sitemap
I maintainer di solito rispondono entro 1 giorno
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
F-06 task 12. ingest() finds pages from a sitemap, a list of URLs, or a local folder (IngestSource in packages/ingest/src/types.ts:5-9). Plenty of small sites have no sitemap. For those, the cloud's onboarding (and chatcops ingest) needs to crawl from the homepage instead.
sources: [{ type: 'crawl', url: 'https://example.com', maxDepth: 3, maxPages: 200 }]
What to do
- Add
{ type: 'crawl'; url: string; maxDepth?: number; maxPages?: number }toIngestSource, with defaults of 3 levels and 500 pages. - Handle it in
discover()(packages/ingest/src/discover.ts:25). Starting fromurl, fetch each page, collect<a href>links, and follow those on the same origin breadth-first, up tomaxDepthlevels andmaxPagespages.- Normalize every link with the existing
normalizeUrl()and skip ones already seen. - Skip
mailto:,tel:, fragments-only links and non-HTML responses. - Respect
robots.txtthe way the other sources already do (robots.ts), and applyinclude/excludebefore fetching.
- Normalize every link with the existing
- Reuse the fetched HTML so a crawled page isn't downloaded twice when it's extracted. The fetch and extract steps are in
ingest.ts. - The concurrency cap (
concurrency) andtimeoutMsapply to crawl fetches too. - Add
--crawl <url>tochatcops ingestinpackages/cli/src/main.ts, or acceptcrawl:sources in the config, whichever fits the existing--sourcehandling better.
Acceptance criteria
- Tests with a local fixture site served by a test HTTP server (
packages/ingest/testsalready has one for sitemaps): follows same-origin links, stops atmaxDepthandmaxPages, ignores other origins,mailto:and fragments, honoursrobots.txtandexclude, and fetches each page once - The source in the ingest options table in
website/src/content/docs/core/knowledge-base.mdx(pnpm docs:checkpasses) - A minor changeset for
@chatcops/ingest(and@chatcops/cliif the CLI changes);pnpm test:coverage(85/80),pnpm lintandpnpm api(commit the snapshot) pass
Comment here to be assigned.
- Lingua principale
- TypeScript
- Stelle
- 13
- Fork
- 7
- Merge medio
- 3h 11m
- PR unite (30g)
- 330
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di codercops/chatcops
-
fix(core): Cohere and Voyage rerankers bypass non-positive limit check on NaN topN and send invalid null payloadForse già presa @bhushan4work l’ha presa 2 giorni fa. Apertabug
codercops/chatcops#582 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Widget: a code block tagged `c++`, `c#` or `objective-c` shows part of the tag as codeForse già presa @prakashNalla l’ha presa 2 giorni fa. Apertabug widget
codercops/chatcops#578 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Docs: Astro, Nuxt and SvelteKit guides for the serverForse già presa @anurag2787 l’ha presa 3 giorni fa. Apertadocumentation
codercops/chatcops#575 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Server: chatcopsNext(), one catch-all route for Next.jsForse già presa @Saifjafri212213 l’ha presa 3 giorni fa. Apertaenhancement server
codercops/chatcops#574 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
@chatcops/react: a <ChatCops> component and useChatCops() hookForse già presa @Saifjafri212213 l’ha presa 3 giorni fa. Apertaenhancement widget
codercops/chatcops#573 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di codercops/chatcops
Issue simili
-
Report: &TV InternationalApertacheck:passed streams:remove
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 67/100
I maintainer di solito rispondono entro 1 giorno
-
bug priority-p1
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
beginner blocked
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
hiero-ledger/hiero-sdk-js#4670 ·
I maintainer di solito rispondono entro 1 giorno
-
[Exploratory] Expense - 2 selected drop-down is shown twice when selecting hold from more option.ApertaMonthly Not a priority
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
Expensify/App#106080 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno