core, python: fix refused renames, extend the client API (#7379)

* core: do not commit refused name changes

* feat(python): add error base and missing commands

* feat(python): let callers drive startup themselves

* style(python): satisfy the linter, skip generated types

* feat(python): expose the message of a command error

* core: update query plans

* core: fix the batch limit parse error on GHC 8.10

* feat(python): reject profile images no client can render
This commit is contained in:
sh
2026-08-17 09:02:14 +01:00
committed by GitHub
parent caac5a61a9
commit 55d18efe24
19 changed files with 718 additions and 82 deletions
+3 -2
View File
@@ -965,9 +965,10 @@ parseChatMessages msg = checkBatchLimit $ case B.head msg of
checkBatchLimit ms
| ms `lengthLE` maxBatchElementCount = ms
| otherwise = [Left "too many messages in batch"]
-- defined prefix: GHC 8.10 does not parse a bang operand in an infix definition
lengthLE :: [a] -> Int -> Bool
[] `lengthLE` !n = n >= 0
(_ : xs) `lengthLE` !n = n > 0 && xs `lengthLE` (n - 1)
lengthLE [] !n = n >= 0
lengthLE (_ : xs) !n = n > 0 && lengthLE xs (n - 1)
parseUncompressed c s = case c of
'[' -> case J.eitherDecodeStrict' s of
Right v -> map (fmap plainMsg . parseItem) v