Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
27626d4
feat(website): add file selection checkboxes for selective re-packing
spandan-kumar Aug 19, 2025
f2beb5b
fix(website): restore sponsor section in loading state
yamadashy Aug 24, 2025
7b79ea8
fix(website): revert API_BASE_URL configuration to standard pattern
yamadashy Aug 24, 2025
a75248d
fix(website): update sponsor section with latest Warp branding
yamadashy Aug 24, 2025
e771f50
fix(website): revert TryItResult to original design structure
yamadashy Aug 24, 2025
f1e19db
feat(website): integrate minimal file selection functionality
yamadashy Aug 24, 2025
d37edde
refactor(website): extract loading state into TryItLoading component
yamadashy Aug 24, 2025
896925d
feat(website): increase rate limit for development environment
yamadashy Aug 24, 2025
c3f823f
feat(website): enable comprehensive token counting for all files
yamadashy Aug 24, 2025
6323877
feat(website): implement tabbed interface for result and file selection
yamadashy Aug 24, 2025
73983d2
chore(website): update repomix dependency to v1.4.0
yamadashy Aug 24, 2025
f7c14f6
feat(website): improve file selection UI and functionality
yamadashy Aug 24, 2025
945c0b6
refactor(website): extract pack icon to reusable component
yamadashy Aug 24, 2025
2ddcaaf
style(website): fix linting issues and improve code formatting
yamadashy Aug 24, 2025
2a4e864
style(website): remove unnecessary border from file list container
yamadashy Aug 24, 2025
3d3fe6a
fix(website): Avoid mutating props directly in TryItFileSelection
yamadashy Aug 24, 2025
629e8bc
refactor(website): improve file selection component structure and mai…
yamadashy Aug 24, 2025
de0c937
fix(website): add fallback for structuredClone compatibility
yamadashy Aug 24, 2025
7ff2e00
fix: lint
yamadashy Aug 24, 2025
cc540ee
fix: lint
yamadashy Aug 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions website/client/components/Home/FileSelectionWarning.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<template>
<div class="warning-message">
<div class="warning-icon">⚠️</div>
<div class="warning-text">
<slot>
Selecting more than {{ threshold }} files may cause processing issues or timeouts. Consider reducing your selection for better performance.
</slot>
</div>
</div>
</template>

<script setup lang="ts">
interface Props {
threshold: number;
}

defineProps<Props>();
</script>

<style scoped>
.warning-message {
display: flex;
align-items: flex-start;
gap: 8px;
padding: 12px 16px;
background: var(--vp-c-warning-soft);
border: 1px solid var(--vp-c-warning);
border-radius: 4px;
margin-bottom: 8px;
}

.warning-icon {
font-size: 16px;
line-height: 1;
flex-shrink: 0;
}

.warning-text {
font-size: 13px;
color: var(--vp-c-text-1);
line-height: 1.4;
}
</style>
17 changes: 3 additions & 14 deletions website/client/components/Home/PackButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,13 @@
type="submit"
>
{{ loading ? 'Processing...' : 'Pack' }}
<svg
v-if="!loading"
class="pack-button-icon"
width="20"
height="20"
viewBox="96.259 93.171 300 300"
>
<g transform="matrix(1.160932, 0, 0, 1.160932, 97.635941, 94.725143)">
<path
fill="currentColor"
d="M 128.03 -1.486 L 21.879 65.349 L 21.848 190.25 L 127.979 256.927 L 234.2 190.27 L 234.197 65.463 L 128.03 -1.486 Z M 208.832 70.323 L 127.984 121.129 L 47.173 70.323 L 128.144 19.57 L 208.832 70.323 Z M 39.669 86.367 L 119.188 136.415 L 119.255 230.529 L 39.637 180.386 L 39.669 86.367 Z M 136.896 230.506 L 136.887 136.575 L 216.469 86.192 L 216.417 180.46 L 136.896 230.506 Z M 136.622 230.849"
/>
</g>
</svg>
<PackIcon v-if="!loading" :size="20" />
</button>
</template>

<script setup>
import PackIcon from './PackIcon.vue';

defineProps({
loading: Boolean,
isValid: Boolean,
Expand Down
31 changes: 31 additions & 0 deletions website/client/components/Home/PackIcon.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<template>
<svg
class="pack-icon"
:width="size"
:height="size"
viewBox="96.259 93.171 300 300"
>
<g transform="matrix(1.160932, 0, 0, 1.160932, 97.635941, 94.725143)">
<path
fill="currentColor"
d="M 128.03 -1.486 L 21.879 65.349 L 21.848 190.25 L 127.979 256.927 L 234.2 190.27 L 234.197 65.463 L 128.03 -1.486 Z M 208.832 70.323 L 127.984 121.129 L 47.173 70.323 L 128.144 19.57 L 208.832 70.323 Z M 39.669 86.367 L 119.188 136.415 L 119.255 230.529 L 39.637 180.386 L 39.669 86.367 Z M 136.896 230.506 L 136.887 136.575 L 216.469 86.192 L 216.417 180.46 L 136.896 230.506 Z M 136.622 230.849"
/>
</g>
</svg>
</template>

<script setup lang="ts">
interface Props {
size?: number | string;
}

withDefaults(defineProps<Props>(), {
size: 16,
});
</script>

<style scoped>
.pack-icon {
flex-shrink: 0;
}
</style>
24 changes: 22 additions & 2 deletions website/client/components/Home/TryIt.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="container">
<form class="try-it-container" @submit.prevent="handleSubmit">
<form class="try-it-container" @submit.prevent="handleSubmit($event)">
<div class="input-row">
<div class="tab-container">
<button
Expand Down Expand Up @@ -93,6 +93,7 @@
:loading="loading"
:error="error"
:repository-url="inputRepositoryUrl"
@repack="handleRepack"
/>
</div>
</form>
Expand All @@ -104,6 +105,7 @@ import { FolderArchive, FolderOpen, Link2, RotateCcw } from 'lucide-vue-next';
import { computed, nextTick, onMounted, ref, watch } from 'vue';
import { usePackRequest } from '../../composables/usePackRequest';
import { hasNonDefaultValues, parseUrlParameters, updateUrlParameters } from '../../utils/urlParams';
import type { FileInfo } from '../api/client';
import { isValidRemoteValue } from '../utils/validation';
import PackButton from './PackButton.vue';
import TryItFileUpload from './TryItFileUpload.vue';
Expand Down Expand Up @@ -137,6 +139,7 @@ const {
setMode,
handleFileUpload,
submitRequest,
repackWithSelectedFiles,
resetOptions,
} = usePackRequest();

Expand Down Expand Up @@ -175,7 +178,20 @@ function updateUrlFromCurrentState() {
updateUrlParameters(urlParamsToUpdate);
}

async function handleSubmit() {
async function handleSubmit(event?: SubmitEvent) {
// Prevent accidental form submissions from unintended buttons
if (event?.submitter && !isSubmitValid.value) {
const submitter = event.submitter as HTMLElement;
if (!submitter.matches('.pack-button, [type="submit"]')) {
return; // Ignore submission from non-pack buttons when form is invalid
}
}

// Only proceed if form is valid
if (!isSubmitValid.value) {
return;
}

await submitRequest();
}

Expand All @@ -193,6 +209,10 @@ function handleReset() {
updateUrlParameters({});
}

function handleRepack(selectedFiles: FileInfo[]) {
repackWithSelectedFiles(selectedFiles);
}

// Watch for changes in packOptions and inputUrl to update URL in real-time
watch(
[packOptions, inputUrl],
Expand Down
Loading
Loading