Commit graph

6231 commits

Author SHA1 Message Date
Sarthak Agarwal
a0fe602a30 react interactive pattern prompt 2026-03-18 03:27:11 +05:30
Sarthak Agarwal
54a123b9eb prompt change for render profile add to all nodes of pipeline 2026-03-11 01:01:09 +05:30
Sarthak Agarwal
ad57aa6bbc prompt update 2026-03-10 22:35:54 +05:30
Sarthak Agarwal
a59eeff5b7 feat: language-aware PR descriptions with TL;DR for JS/TS
- Add language field to PrCommentFields interface in cf-api and cf-webapp
- For JS/TS PRs, extract first paragraph as a visible summary ("TL;DR")
  and collapse the full explanation into a <details> block
- Use correct code block language (typescript vs python) for generated
  test code in PR body
- Remove Python-specific comments from type definitions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 05:25:55 +05:30
Sarthak Agarwal
e18a111d2b md support extract from md if returned from llms 2026-02-25 02:41:05 +05:30
Sarthak Agarwal
88158b51d5 prompt changes 2026-02-24 04:23:42 +05:30
Sarthak Agarwal
5db4f435a8 add tsx, jsx validation support 2026-02-23 23:47:55 +05:30
Sarthak Agarwal
ef0fd4b2ab
Merge branch 'main' into react_omni 2026-02-23 17:01:47 +05:30
Kevin Turcios
05aecd6fbd
Merge pull request #2437 from codeflash-ai/misc-changes
fix: improve ranker scoring consistency and local-caching bias
2026-02-23 08:55:18 +00:00
Kevin Turcios
40ff909b03 fix: add DATABASE_URL and DJANGO_SETTINGS_MODULE to pr-review workflow
Coverage analysis in the Claude pr-review job needs these env vars
to run pytest, matching how django-unit-tests and codeflash-aiservice
workflows configure them.
2026-02-23 03:43:33 -05:00
claude[bot]
bf4e38c301 fix: add cast to satisfy ty type checker for list covariance
The ty type checker correctly flags that list[str] is not a subtype of list[str | None] due to list invariance. Added explicit cast.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-23 08:42:24 +00:00
Kevin Turcios
16e043883a style: auto-format ranker and test_markdown_utils 2026-02-23 03:39:38 -05:00
Kevin Turcios
85a1c8b183 fix: derive ranker ranking from structured scores instead of LLM array
The JSON parsing path returned the LLM's explicit ranking array,
which sometimes contradicted its own per-dimension scores. Use
_scores_to_ranking() to compute the ranking from weighted scores
when available, falling back to the LLM ranking only when scores
are absent.
2026-02-23 03:37:42 -05:00
Kevin Turcios
20ee6d5b62 fix: penalize local variable caching of globals in ranker prompt
The ranker LLM was rewarding candidates that cache global variables
into locals as a performance win. Add an explicit rule: this is only
relevant on Python ≤3.10; on 3.11+ LOAD_GLOBAL uses adaptive
specialization and is nearly as fast as LOAD_FAST.
2026-02-23 03:37:21 -05:00
Kevin Turcios
c95a36cf38 fix: handle nested code fences in extract_code_block
The non-greedy regex in FIRST_CODE_BLOCK_PATTERN stopped at the first
``` occurrence, even inside triple-quoted strings or nested code fence
blocks. This truncated the extracted code and lost test functions when
LLMs embedded function definitions using ```python:filepath syntax.

Switch to greedy matching and require the closing ``` to be alone on
its line so intermediate backticks are skipped.
2026-02-23 03:36:50 -05:00
Kevin Turcios
ca71d0c8a0 refactor: remove constructor notes preprocessing from testgen pipeline
Full class source is now included in the client-side testgen context,
making the server-side constructor signature extraction redundant.
2026-02-23 03:36:50 -05:00
Kevin Turcios
bfd9f2cd04 fix: respect test_index when creating optimization_features row
The get_or_create defaults passed test lists without positional
indexing, so when a higher test_index created the row first its
content landed at index 0 and was overwritten by the lower index
update, losing a test.
2026-02-23 03:36:50 -05:00
Kevin Turcios
6346d0992a chore: rename repo path env vars to match standard names
CODEFLASH_INTERNAL_REPO_PATH → AISERVICE_DIR, CODEFLASH_CLI_REPO_PATH → CODEFLASH_DIR
2026-02-23 03:36:50 -05:00
Kevin Turcios
af3185edff fix: handle non-numeric patch suffixes and support Python 3.15 2026-02-23 03:36:50 -05:00
Sarthak Agarwal
2cb3d51ddb
fix issue with closed and merged PRs raising suggestion (#2436) 2026-02-21 01:23:55 +05:30
Sarthak Agarwal
81f8bd76c1 react omni aiservice 2026-02-21 00:37:39 +05:30
Sarthak Agarwal
eb5f4b460e
Migrate to AWS bedrock (#2430)
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_REGION=us-east-1



Will require these for boto3 authentication
2026-02-20 23:52:48 +05:30
Kevin Turcios
7005156190
Merge pull request #2427 from codeflash-ai/class-constructor-notes
feat: add constructor notes for non-dataclass classes
2026-02-19 01:46:55 +00:00
Kevin Turcios
b5af1ca353
Merge branch 'main' into class-constructor-notes 2026-02-19 01:46:45 +00:00
Kevin Turcios
a69f67f68f
Merge pull request #2428 from codeflash-ai/fix-windows-skill-filenames
fix: rename skill files to be Windows-compatible
2026-02-17 05:06:29 +00:00
Kevin Turcios
a21eb7aba2 fix: rename skill files to be Windows-compatible
Renamed skill files from using colons to dashes (e.g., tessl:add-api-endpoint → tessl-add-api-endpoint) to fix checkout issues on Windows filesystems which don't allow colons in filenames.

Skills will continue to work as the files contain relative paths to .tessl directory and don't reference their own filenames.
2026-02-17 05:01:30 +00:00
Sarthak Agarwal
e22e5d1f8b
Add codeflash optimization workflow for cf-api and cf-webapp (#2411)
Co-authored-by: Kevin Turcios <106575910+KRRT7@users.noreply.github.com>
2026-02-16 19:48:15 +05:30
claude[bot]
1bb1407c6b fix: resolve type checker errors 2026-02-15 12:33:05 +00:00
Kevin Turcios
d6a3c6254f feat: add constructor notes for non-dataclass classes with __init__
The LLM prompt preprocessing now highlights __init__ signatures for
regular classes, not just @dataclass ones, reducing brute-force
constructor guessing and pytest.skip() fallbacks in generated tests.
2026-02-15 07:29:05 -05:00
Kevin Turcios
38eda0c2d6
Merge pull request #2426 from codeflash-ai/observability-chat-codebase-browsing
feat: observability chat codebase browsing and model attribution fix
2026-02-15 06:50:59 -05:00
Kevin Turcios
e5d70443db fix: use positional insertion in log_features to preserve model attribution
log_features() appended test results in call-completion order, causing
model attribution swaps when LLM responses arrived out of order. Pass
test_index through and use positional insertion instead of append.
2026-02-15 03:58:05 -05:00
Kevin Turcios
496033539e fix: use flex column layout and SSR-safe localStorage for split pane
Replace sticky positioning + ResizeObserver height calc with a flex
column layout (h-screen container, flex-1 panel group) that reliably
fills the viewport. Drop useDefaultLayout hook (not SSR-safe) in favor
of manual localStorage persistence inside useEffect.
2026-02-15 03:58:04 -05:00
Kevin Turcios
bf826a6e0f feat: add resizable split pane and expandable tool results to observability chat
Replace the fixed 480px chat overlay with a draggable split-pane layout
using react-resizable-panels, and make tool rounds expandable to show
the actual data the agent retrieved (code, errors, LLM call details).
2026-02-15 03:58:04 -05:00
Kevin Turcios
a3f9c655f9 fix: guarantee text response when agent loop produces only thinking blocks
Remove MAX_TOOL_ROUNDS cap so the model decides when to stop calling
tools. Add a safety net that makes a final tool-free API call if the
loop ends without emitting any visible text, fixing empty assistant
bubbles. Clean up redundant comments.
2026-02-15 03:58:04 -05:00
Kevin Turcios
870968e7a7 refactor: restructure system prompt for Claude Opus 4.6 best practices
- Move trace data to top of prompt (long-context best practice: data
  before instructions improves quality ~30%)
- Wrap sections in XML tags (<trace_data>, <role>, <domain_knowledge>,
  <guidelines>, <use_parallel_tool_calls>) for better parseability
- Remove aggressive language (MUST, CRITICAL, HARD REQUIREMENT) that
  causes overtriggering on Opus 4.6
- Replace rigid 4-step investigation workflow with general guidelines
  to let adaptive thinking handle reasoning strategy
- Remove duplicate content (tool reference section, two checklists)
- Add <use_parallel_tool_calls> block per Anthropic's recommended pattern
- Tone down tool descriptions from directive to descriptive
- Net reduction: 49 fewer lines in system prompt
2026-02-15 03:58:04 -05:00
Kevin Turcios
ae2bff113d fix: prevent context blowup by redacting thinking blocks between rounds
Thinking blocks from previous tool rounds (10-50KB each) were
accumulating in conversation history, causing Azure AI Foundry to hang
after 4+ rounds. Redact thinking content before each API call while
preserving required block structure. Also adds per-round timeout safety
net and status indicators between rounds.
2026-02-15 03:58:04 -05:00
Kevin Turcios
fbcc283e97 perf: unify agent loop and pre-build lookup maps for O(1) tool calls
Eliminate redundant API call by extracting text from the loop's final
response directly instead of making a separate streaming call. Pre-build
candidatesBySource, candidatesById, and testModelMap in indexTraceData()
to replace repeated O(n) linear searches in tool calls and prompt
building. Combine cost/token aggregation into a single pass.
2026-02-15 03:58:04 -05:00
Kevin Turcios
b09262ccbc feat: add tool activity display and fix streaming timeout in observability chat
Restructure agent loop to use stream()+finalMessage() for all API calls,
fixing the SDK's non-streaming timeout error with max_tokens 32k. Add
parallel tool execution, tool activity bubbles in the frontend, and
restructure the system prompt for better investigation behavior.
2026-02-15 03:58:04 -05:00
Kevin Turcios
51372ca0ad feat: add debugging workflow and response checklist to observability chat prompt
Guide the chat agent to use the new tools proactively: a DEBUGGING TOOLS
section with structured guidance for get_llm_call_detail and codebase
browsing, a 4-step workflow (OBSERVE → INVESTIGATE → LOCATE → RECOMMEND),
and a RESPONSE CHECKLIST at the end of the prompt requiring the agent to
cite real file paths before responding.
2026-02-15 03:58:04 -05:00
Kevin Turcios
782ee508de feat: add codebase browsing and LLM call inspection to observability chat
Give the observability chat agent four new tools: get_llm_call_detail
(full prompt/response for any LLM call), read_file, search_code, and
list_directory for navigating the codeflash-internal and codeflash CLI
repos. This lets the agent trace problems end-to-end from trace data
through actual prompts to pipeline source code.

- Add id to IndexedTraceData.llmCalls so the agent can reference calls
- Make resolveToolCall async (Prisma + fs + child_process)
- Make processToolUseResponse async to match
- Bump MAX_TOOL_ROUNDS from 5 to 15 for multi-step code browsing
- Add CODEFLASH_INTERNAL_REPO_PATH / CODEFLASH_CLI_REPO_PATH env vars
- Path traversal protection, file size caps, search result limits
2026-02-15 03:58:04 -05:00
Kevin Turcios
eecd3ba4ce
Merge pull request #2425 from codeflash-ai/tessl-json-update
chore: update tessl config and add npm tiles
2026-02-15 03:57:09 -05:00
Kevin Turcios
6933fe07ac chore: add npm tessl tiles from tessl install 2026-02-15 03:56:05 -05:00
Kevin Turcios
9ab71ad672 chore: add .next/ to gitignore 2026-02-15 03:55:12 -05:00
Kevin Turcios
b6dc71421a chore: update tessl.json with npm tile entries 2026-02-15 03:54:13 -05:00
Kevin Turcios
e4050920d2
Merge pull request #2424 from codeflash-ai/tessl-setup
chore: add tessl tiles, claude skills, and local settings
2026-02-15 00:05:28 -05:00
Kevin Turcios
686fb9d156 chore: remove local claude settings files 2026-02-15 00:05:08 -05:00
Kevin Turcios
70c8df6bd4 chore: remove aiservice local claude settings 2026-02-15 00:04:31 -05:00
Kevin Turcios
aff375ed20 chore: add tessl tiles, claude skills, and local settings 2026-02-15 00:03:01 -05:00
Kevin Turcios
0b52998698
Merge pull request #2423 from codeflash-ai/slim-claude-md-internal
Add Tessl tiles for codeflash-internal
2026-02-14 22:36:40 -05:00
Kevin Turcios
db717aaedc
Merge branch 'main' into slim-claude-md-internal 2026-02-14 22:33:09 -05:00