mirror of
https://github.com/runbear-io/beardrive.git
synced 2026-08-25 08:08:08 +02:00
feat(onboarding): folder name follows the project name, and project ids are UUIDs (#89)
The paste prompt now carries the project's name so an agent recommends a folder of that name; with no project at all the recommendation is `shared/` (and `bdrive init shared` names the new project after the folder), replacing the old `wiki/` default. New project ids are UUIDs instead of `p-` + 8 hex chars. The route validator still accepts the legacy shape — ids are permanent — and the client-side URL parsers (remote/http.go, bdrive share) now only check the shape of a URL segment, leaving the hub as the single authority on which ids are valid. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
fb6ce347c4
commit
fd4f5c7964
@@ -36,7 +36,10 @@ type httpBackend struct {
|
||||
hc *http.Client
|
||||
}
|
||||
|
||||
var projectPathRe = regexp.MustCompile(`^/p/(p-[0-9a-f]{8})/?$`)
|
||||
// The id is whatever the hub minted (a UUID today, `p-xxxxxxxx` on older
|
||||
// hubs), so this only checks the shape of a URL segment — the hub is the
|
||||
// authority on which ids exist.
|
||||
var projectPathRe = regexp.MustCompile(`^/p/([A-Za-z0-9._-]{4,64})/?$`)
|
||||
|
||||
func newHTTPBackend(raw string) (*httpBackend, error) {
|
||||
u, err := url.Parse(raw)
|
||||
|
||||
Reference in New Issue
Block a user