Earlier quoted context omitted.
An LLM company using regexes for sentiment analysis? That's like a truck company using horses to transport parts. Weird choice.
Because they want it to be executed quickly and cheaply without blocking the workflow? Doesn’t seem very weird to me at all.
Claude Code's source code has been leaked via a map file in their NPM registry
171–180 of 1001 posts
Re: Claude Code's source code has been leaked via a map file in their NPM registry
#172Re: Claude Code's source code has been leaked via a map file in their NPM registry
#173Maybe the OP could clarify, I don't like reading leaked code, but I'm curious: my understanding is that is it the source code for "claude code", the coding assistant that remotely calls the LLMs. Is that correct ? The weights of the LLMs are _not_ in this repo, right ? It sure sucks for anthropic to get pawned like this, but it should not affect their bottom line much ?
This code hasn't been open source until now and contains information like the system prompts, internal feature flags, etc.
Re: Claude Code's source code has been leaked via a map file in their NPM registry
#174Earlier quoted context omitted.
export function extractSearchToken(completionToken: { token: string; isQuoted?: boolean; }): string { if (completionToken.isQuoted) { // Remove @" prefix and optional closing " return completionToken.token.slice(2).replace(/"$/, ''); } else if (completionToken.token.startsWith('@')) { return completionToken.token.substring(1); } else { return completionToken.token; } } Why even use else if with return...
I always write code like that. I don't like early returns. This approximates `if` statements being an expression that returns something.
But you can achieve a similar effect by keeping your functions small, in which case I think both styles are roughly equivalent.
Re: Claude Code's source code has been leaked via a map file in their NPM registry
#175Would be interesting to run this through Malus [1] or literally just Claude Code and get open source Claude Code out of it. I jest, but in a world where these models have been trained on gigatons of open source I don't even see the moral problem. IANAL, don't actually do this. https://malus.sh/
Oh god, I was so close to believing Malus was a real product and not satire.
Re: Claude Code's source code has been leaked via a map file in their NPM registry
#176Re: Claude Code's source code has been leaked via a map file in their NPM registry
#177Undercover mode also pretends to be human, which I'm less ok with: https://github.com/chatgptprojects/claude-code/blob/642c7f94...
Re: Claude Code's source code has been leaked via a map file in their NPM registry
#178Re: Claude Code's source code has been leaked via a map file in their NPM registry
#179Re: Claude Code's source code has been leaked via a map file in their NPM registry
#180Finally all spinner verbs revealed: https://github.com/instructkr/claude-code/blob/main/src/cons...