Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/abi/screenshot-to-code
/ functions
Functions
861 in github.com/abi/screenshot-to-code
⨍
Functions
861
◇
Types & classes
174
↳
Endpoints
20
↓ 300 callers
Method
get
(self, url: str)
backend/tests/test_tool_image_outputs.py:169
↓ 57 callers
Function
ensure_str
(value: Any)
backend/agent/state.py:15
↓ 43 callers
Function
cn
(...inputs: ClassValue[])
frontend/src/lib/utils.ts:4
↓ 36 callers
Function
_get_event_attr
(event: Any, key: str, default: Any = None)
backend/agent/providers/openai.py:63
↓ 24 callers
Function
normalize_url
Normalize URL to ensure it has a proper protocol. If no protocol is specified, default to https://
backend/routes/screenshot.py:10
↓ 23 callers
Method
addEventListener
(type: string, listener: (event: unknown) => void)
frontend/src/tests/qa.test.ts:457
↓ 19 callers
Method
execute
(self, tool_call: ToolCall)
backend/agent/tools/runtime.py:53
↓ 19 callers
Method
removeEventListener
(type: string, listener: (event: unknown) => void)
frontend/src/tests/qa.test.ts:464
↓ 16 callers
Function
build_prompt_messages
( stack: Stack, input_mode: InputMode, generation_type: str, prompt: UserTurnInput, histor
backend/prompts/pipeline.py:12
↓ 15 callers
Function
getVariantLabel
( model: string | undefined, context: VariantLabelContext )
frontend/src/lib/models.ts:49
↓ 15 callers
Function
summarize_text
(value: str, limit: int = 240)
backend/agent/tools/summaries.py:9
↓ 13 callers
Function
on_event
(event: StreamEvent)
backend/tests/test_openai_reasoning_parser.py:16
↓ 13 callers
Method
record_request
(self, request_payload: Any)
backend/fs_logging/prompt_reports.py:89
↓ 12 callers
Function
extract_html_content
(text: str)
backend/codegen/utils.py:4
↓ 11 callers
Method
_send
( self, msg_type: str, value: Optional[str] = None, data: Optional[Dict[str, A
backend/agent/engine.py:89
↓ 11 callers
Function
canonical_tool_definitions
( image_generation_enabled: bool = True, image_editing_enabled: bool = True, asset_extraction_enab
backend/agent/tools/definitions.py:168
↓ 11 callers
Method
select_models
Select appropriate models based on available API keys
backend/routes/generate_code.py:411
↓ 11 callers
Method
send_message
(self)
backend/routes/generate_code.py:98
↓ 10 callers
Function
_data_url
(payload: bytes, content_type: str = "image/png")
backend/tests/test_agent_tool_runtime.py:13
↓ 10 callers
Method
stream_turn
(self, on_event: EventSink)
backend/agent/providers/openai.py:437
↓ 10 callers
Method
takeScreenshot
(step: string)
frontend/src/tests/qa.test.ts:244
↓ 10 callers
Method
wrapped_file
(content: str)
backend/tests/test_prompts.py:91
↓ 9 callers
Function
_test_tools
()
backend/tests/test_openai_provider_session.py:41
↓ 9 callers
Function
assert_structure_match
Compare actual and expected structures with special markers: - <ANY>: Matches any value - <CONTAINS:text>: Checks if the actual value con
backend/tests/test_prompts.py:20
↓ 9 callers
Method
edit
(edit: string, version: string)
frontend/src/tests/qa.test.ts:321
↓ 9 callers
Function
parse_prompt_content
(raw_prompt: object)
backend/prompts/request_parsing.py:13
↓ 8 callers
Function
_make_logger
(enabled: bool = True)
backend/tests/test_prompt_reports.py:31
↓ 8 callers
Method
cost
Compute cost in USD using per-million-token rates.
backend/agent/providers/token_usage.py:47
↓ 8 callers
Function
display_asset_url
(url: str)
backend/routes/export.py:149
↓ 8 callers
Function
truncate_for_log
(value: Any, max_len: int = 120)
backend/fs_logging/openai_input_formatting.py:8
↓ 7 callers
Function
buildSelectedElementInstruction
( instruction: string, elementHtml: string, elementContext?: string )
frontend/src/components/select-and-edit/utils.ts:39
↓ 7 callers
Method
cache_hit_rate_percent
Percent of total input tokens served from cache.
backend/agent/providers/token_usage.py:60
↓ 7 callers
Function
fakeElement
(tag: string, classAttr: string, outerHTML = "")
frontend/src/components/select-and-edit/utils.test.ts:15
↓ 7 callers
Function
local_asset_url_to_data_url
Inline a localhost ``/local-assets/`` URL as a base64 data URL. External URLs and existing data URLs are returned unchanged, as is any localh
backend/agent/tools/local_assets.py:60
↓ 7 callers
Function
next_func
()
backend/tests/test_status_broadcast.py:54
↓ 7 callers
Method
resetTestHooks
()
frontend/src/tests/qa.test.ts:236
↓ 7 callers
Method
throw_error
(self)
backend/routes/generate_code.py:103
↓ 6 callers
Method
accumulate
(self, other: TokenUsage)
backend/agent/providers/token_usage.py:40
↓ 6 callers
Function
compare_openai_inputs
( left_payload: Any, right_payload: Any, )
backend/fs_logging/openai_input_compare.py:129
↓ 6 callers
Function
emit
(event: dict)
backend/routes/evals.py:238
↓ 6 callers
Method
extract_and_validate
Extract and validate all parameters from the request
backend/routes/generate_code.py:280
↓ 6 callers
Method
init
()
frontend/src/tests/qa.test.ts:210
↓ 6 callers
Function
normalize_babel_cdn
Rewrite any @babel/standalone CDN URL to the pinned, working version.
backend/babel_cdn.py:25
↓ 6 callers
Method
record_usage
(self, usage: TokenUsage)
backend/fs_logging/prompt_reports.py:122
↓ 6 callers
Function
tag_attr
(tag: Tag, attribute_name: str)
backend/routes/export.py:127
↓ 6 callers
Method
use
Add a middleware to the pipeline
backend/routes/generate_code.py:125
↓ 6 callers
Method
waitUntilVersionIsReady
(version: string)
frontend/src/tests/qa.test.ts:250
↓ 5 callers
Function
_data_url
(payload: bytes, content_type: str = "image/png")
backend/tests/test_uploaded_assets.py:14
↓ 5 callers
Function
_extract_openai_usage
Extract unified token usage from an OpenAI Responses ``response.completed`` event. OpenAI includes cached tokens inside ``input_tokens``, so they
backend/agent/providers/openai.py:143
↓ 5 callers
Function
_get_anthropic_api_model_name
(model: Llm)
backend/agent/providers/anthropic/provider.py:54
↓ 5 callers
Method
_get_from_settings_dialog_or_env
Get value from client settings or environment variable
backend/routes/generate_code.py:389
↓ 5 callers
Function
add_candidate
(candidates: dict[str, AssetCandidate], raw_url: str)
backend/routes/export.py:132
↓ 5 callers
Function
build_design_system_prompt_block
(design_system: str | None)
backend/prompts/design_system.py:1
↓ 5 callers
Function
build_selected_stack_policy
(stack: Stack)
backend/prompts/policies.py:4
↓ 5 callers
Function
build_user_image_policy
(image_generation_enabled: bool)
backend/prompts/policies.py:8
↓ 5 callers
Function
create_provider_session
( model: Llm, prompt_messages: list[ChatCompletionMessageParam], should_generate_images: bool,
backend/agent/providers/factory.py:18
↓ 5 callers
Function
emit_progress
(event: dict[str, Any])
backend/evals/runner.py:217
↓ 5 callers
Function
isFiniteNumber
(value: unknown)
frontend/src/components/agent/AgentActivity.tsx:55
↓ 5 callers
Function
parse_event
( event: Any, state: OpenAIResponsesParseState, on_event: EventSink, )
backend/agent/providers/openai.py:168
↓ 5 callers
Function
parse_prompt_history
(raw_history: object)
backend/prompts/request_parsing.py:32
↓ 5 callers
Function
registerAssetIds
( type: PromptAssetType, dataUrls: string[], getAssetsById: GetAssetsById, upsertPromptAssets: UpsertP
frontend/src/lib/prompt-history.ts:28
↓ 5 callers
Function
reset
()
frontend/src/App.tsx:238
↓ 5 callers
Method
run
(self, model: Llm, prompt_messages: List[ChatCompletionMessageParam])
backend/agent/engine.py:254
↓ 4 callers
Function
_executed
(parts: List[ToolMultimodalPart], ok: bool = True)
backend/tests/test_tool_image_outputs.py:56
↓ 4 callers
Function
_extract_anthropic_usage
Extract unified token usage from an Anthropic final message. Anthropic includes thinking tokens in ``output_tokens`` so no extra addition is
backend/agent/providers/anthropic/provider.py:207
↓ 4 callers
Method
_mark_preview_length
(self, tool_event_id: Optional[str], length: int)
backend/agent/engine.py:98
↓ 4 callers
Function
_to_string_list
(value: object)
backend/prompts/request_parsing.py:6
↓ 4 callers
Function
buildUserHistoryMessage
( text: string, imageAssetIds: string[] = [], videoAssetIds: string[] = [] )
frontend/src/lib/prompt-history.ts:87
↓ 4 callers
Function
derive_prompt_construction_plan
( stack: Stack, input_mode: InputMode, generation_type: str, history: list[PromptHistoryMessag
backend/prompts/plan.py:9
↓ 4 callers
Function
describeElementContext
(el: Element)
frontend/src/components/select-and-edit/utils.ts:17
↓ 4 callers
Function
doCreate
( referenceImages: string[], inputMode: "image" | "video", textPrompt: string = "" )
frontend/src/App.tsx:559
↓ 4 callers
Function
finishAssistantEvent
(variantIndex: number, status: "complete" | "error")
frontend/src/App.tsx:374
↓ 4 callers
Function
finishThinkingEvent
(variantIndex: number, status: "complete" | "error")
frontend/src/App.tsx:364
↓ 4 callers
Function
format_prompt_summary
(prompt_messages: List[ChatCompletionMessageParam], truncate: bool = True)
backend/utils.py:12
↓ 4 callers
Function
getRecord
(value: unknown)
frontend/src/components/agent/AgentActivity.tsx:97
↓ 4 callers
Function
get_design_systems_file_path
()
backend/routes/design_systems.py:32
↓ 4 callers
Function
get_openai_api_name
(model: Llm)
backend/llm.py:123
↓ 4 callers
Function
get_prompt_reports_directory
()
backend/fs_logging/prompt_reports.py:40
↓ 4 callers
Function
handleVote
(index: number, outcome: Outcome)
frontend/src/components/evals/BestOfNEvalsPage.tsx:311
↓ 4 callers
Function
persist_data_url_as_asset
Persist a data URL straight to a durable, served asset. Skips the temp-staging hop used for uploads: callers that already know the image is a
backend/uploaded_assets/store.py:240
↓ 4 callers
Function
persist_data_url_as_temporary_asset
Stage an uploaded data URL as a temporary asset, pending a later promote. Used for user uploads, where only some images turn out to be assets the
backend/uploaded_assets/store.py:208
↓ 4 callers
Method
raise_for_status
(self)
backend/tests/test_tool_image_outputs.py:156
↓ 4 callers
Function
read_design_systems
()
backend/routes/design_systems.py:65
↓ 4 callers
Function
renderHistory
(history: Commit[])
frontend/src/components/history/utils.ts:81
↓ 4 callers
Function
setSelectedDesignSystemId
(id: string | null)
frontend/src/components/settings/GenerationSettings.tsx:33
↓ 4 callers
Function
summarize_responses_input_item
(index: int, item: Any)
backend/fs_logging/openai_input_formatting.py:158
↓ 4 callers
Function
summarize_tool_input
(tool_call: ToolCall, file_state: AgentFileState)
backend/agent/tools/summaries.py:15
↓ 4 callers
Method
switchToTab
(testId: string)
frontend/src/tests/qa.test.ts:263
↓ 4 callers
Function
to_serializable
Convert a request payload into JSON-serializable data. Pydantic models (OpenAI/Gemini SDK types) are dumped in python mode so that raw bytes
backend/fs_logging/prompt_reports.py:48
↓ 4 callers
Method
total_input_tokens
All input tokens, including non-cached, cache-read, and cache-write.
backend/agent/providers/token_usage.py:56
↓ 3 callers
Function
_append_dict_path
(path: str, key: str)
backend/fs_logging/openai_input_compare.py:52
↓ 3 callers
Function
_convert_message_to_responses_input
( message: ChatCompletionMessageParam, image_detail: str = "high", )
backend/agent/providers/openai.py:27
↓ 3 callers
Method
_effective_replicate_api_key
(self)
backend/agent/tools/runtime.py:50
↓ 3 callers
Function
_extract_output_url
(result: Any, context: str)
backend/image_generation/replicate.py:104
↓ 3 callers
Function
_get_anthropic_effort
(model: Llm)
backend/agent/providers/anthropic/provider.py:58
↓ 3 callers
Function
_get_gemini_api_model_name
(model: Llm)
backend/agent/providers/gemini.py:43
↓ 3 callers
Method
_next_event_id
(self, prefix: str)
backend/agent/engine.py:86
↓ 3 callers
Function
asElement
(el: FakeElement)
frontend/src/components/select-and-edit/utils.test.ts:25
↓ 3 callers
Function
as_dict
(value: Any)
backend/fs_logging/openai_input_formatting.py:15
↓ 3 callers
Function
build_history_message
(item: PromptHistoryMessage)
backend/prompts/message_builder.py:17
next →
1–100 of 861, ranked by callers